home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: LaTeX Document
(document/latex).
You can browse this item here: TADS21.TEX
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| LaTeX Document (document/latex)
| magic
| Supported |
99%
| dexvert
| Texinfo Document (document/texInfo)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| LaTeX document text
| default
| |
99%
| file
| TeX document text
| default
| |
98%
| file
| LaTeX auxiliary file, ASCII text, with CRLF line terminators
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| x-fmt/111 Plain Text File
| default
| |
100%
| detectItEasy
| Format: plain text[CRLF]
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 25 20 43 6f 70 79 72 69 | 67 68 74 20 28 63 29 20 |% Copyri|ght (c) |
|00000010| 31 39 39 31 2c 20 31 39 | 39 36 20 62 79 20 4d 69 |1991, 19|96 by Mi|
|00000020| 63 68 61 65 6c 20 4a 2e | 20 52 6f 62 65 72 74 73 |chael J.| Roberts|
|00000030| 2e 20 20 41 6c 6c 20 52 | 69 67 68 74 73 20 52 65 |. All R|ights Re|
|00000040| 73 65 72 76 65 64 2e 0d | 0a 25 0d 0a 25 20 74 61 |served..|.%..% ta|
|00000050| 64 73 20 32 2e 31 20 64 | 6f 63 75 6d 65 6e 74 61 |ds 2.1 d|ocumenta|
|00000060| 74 69 6f 6e 0d 0a 25 0d | 0a 0d 0a 25 20 73 65 74 |tion..%.|...% set|
|00000070| 20 75 70 20 74 6f 20 77 | 72 69 74 65 20 63 6f 6e | up to w|rite con|
|00000080| 74 65 6e 74 73 20 65 6e | 74 72 69 65 73 20 74 6f |tents en|tries to|
|00000090| 20 74 61 62 6c 65 20 6f | 66 20 63 6f 6e 74 65 6e | table o|f conten|
|000000a0| 74 73 20 66 69 6c 65 0d | 0a 5c 6e 65 77 77 72 69 |ts file.|.\newwri|
|000000b0| 74 65 5c 74 6f 63 0d 0a | 5c 69 6d 6d 65 64 69 61 |te\toc..|\immedia|
|000000c0| 74 65 5c 6f 70 65 6e 6f | 75 74 5c 74 6f 63 3d 74 |te\openo|ut\toc=t|
|000000d0| 32 31 63 5f 67 65 6e 0d | 0a 0d 0a 25 5c 68 73 69 |21c_gen.|...%\hsi|
|000000e0| 7a 65 3d 35 2e 35 69 6e | 20 5c 76 73 69 7a 65 3d |ze=5.5in| \vsize=|
|000000f0| 37 69 6e 0d 0a 5c 68 73 | 69 7a 65 3d 34 2e 35 69 |7in..\hs|ize=4.5i|
|00000100| 6e 20 5c 76 73 69 7a 65 | 3d 37 69 6e 0d 0a 0d 0a |n \vsize|=7in....|
|00000110| 5c 69 6e 70 75 74 20 66 | 6f 6e 74 73 0d 0a 25 5c |\input f|onts..%\|
|00000120| 69 6e 70 75 74 20 68 65 | 5f 6c 6f 67 6f 0d 0a 5c |input he|_logo..\|
|00000130| 66 6f 6e 74 5c 62 69 67 | 62 66 3d 63 6d 62 78 31 |font\big|bf=cmbx1|
|00000140| 32 0d 0a 5c 66 6f 6e 74 | 5c 74 77 65 6c 76 65 69 |2..\font|\twelvei|
|00000150| 74 3d 63 6d 74 69 31 32 | 0d 0a 5c 64 65 66 5c 74 |t=cmti12|..\def\t|
|00000160| 6f 70 69 63 23 31 5c 70 | 61 72 7b 5c 76 73 6b 69 |opic#1\p|ar{\vski|
|00000170| 70 30 2e 32 35 69 6e 5c | 6d 65 73 73 61 67 65 7b |p0.25in\|message{|
|00000180| 23 31 7d 0d 0a 5c 77 72 | 69 74 65 5c 74 6f 63 7b |#1}..\wr|ite\toc{|
|00000190| 5c 73 74 72 69 6e 67 5c | 63 6f 6e 74 69 74 65 6d |\string\|contitem|
|000001a0| 7b 23 31 7d 7b 5c 6e 75 | 6d 62 65 72 5c 70 61 67 |{#1}{\nu|mber\pag|
|000001b0| 65 6e 6f 7d 7d 0d 0a 5c | 68 72 75 6c 65 5c 6e 6f |eno}}..\|hrule\no|
|000001c0| 62 72 65 61 6b 5c 6d 65 | 64 73 6b 69 70 5c 6c 65 |break\me|dskip\le|
|000001d0| 66 74 6c 69 6e 65 7b 5c | 62 69 67 62 66 23 31 7d |ftline{\|bigbf#1}|
|000001e0| 5c 6e 6f 62 72 65 61 6b | 5c 62 69 67 73 6b 69 70 |\nobreak|\bigskip|
|000001f0| 5c 76 73 6b 69 70 2d 5c | 70 61 72 73 6b 69 70 0d |\vskip-\|parskip.|
|00000200| 0a 5c 6e 6f 69 6e 64 65 | 6e 74 7d 0d 0a 0d 0a 25 |.\noinde|nt}....%|
|00000210| 20 6b 65 72 6e 20 76 65 | 72 44 6f 56 65 72 62 20 | kern ve|rDoVerb |
|00000220| 61 6e 64 20 76 65 72 49 | 6f 56 65 72 62 20 70 72 |and verI|oVerb pr|
|00000230| 6f 70 65 72 6c 79 0d 0a | 5c 64 65 66 5c 76 65 72 |operly..|\def\ver|
|00000240| 49 6f 56 65 72 62 7b 5c | 68 62 6f 78 7b 5c 74 74 |IoVerb{\|hbox{\tt|
|00000250| 20 76 65 72 49 6f 7b 5c | 69 74 5c 6b 65 72 6e 2d | verIo{\|it\kern-|
|00000260| 30 2e 36 65 78 20 56 5c | 6b 65 72 6e 2d 30 2e 33 |0.6ex V\|kern-0.3|
|00000270| 65 78 20 65 72 62 5c 2f | 7d 7d 7d 0d 0a 5c 64 65 |ex erb\/|}}}..\de|
|00000280| 66 5c 76 65 72 44 6f 56 | 65 72 62 7b 5c 68 62 6f |f\verDoV|erb{\hbo|
|00000290| 78 7b 5c 74 74 20 76 65 | 72 44 6f 7b 5c 69 74 5c |x{\tt ve|rDo{\it\|
|000002a0| 6b 65 72 6e 2d 30 2e 36 | 65 78 20 56 5c 6b 65 72 |kern-0.6|ex V\ker|
|000002b0| 6e 2d 30 2e 33 65 78 20 | 65 72 62 5c 2f 7d 7d 7d |n-0.3ex |erb\/}}}|
|000002c0| 0d 0a 0d 0a 5c 66 6f 6e | 74 5c 62 69 67 72 6d 3d |....\fon|t\bigrm=|
|000002d0| 63 6d 72 31 30 20 73 63 | 61 6c 65 64 5c 6d 61 67 |cmr10 sc|aled\mag|
|000002e0| 73 74 65 70 35 0d 0a 25 | 0d 0a 25 20 50 61 67 65 |step5..%|..% Page|
|000002f0| 20 6c 61 79 6f 75 74 20 | 73 74 75 66 66 20 73 74 | layout |stuff st|
|00000300| 6f 6c 65 6e 20 66 72 6f | 6d 20 74 61 64 73 64 65 |olen fro|m tadsde|
|00000310| 66 2e 74 65 78 0d 0a 25 | 0d 0a 5c 6e 65 77 64 69 |f.tex..%|..\newdi|
|00000320| 6d 65 6e 5c 72 65 61 6c | 68 73 69 7a 65 0d 0a 5c |men\real|hsize..\|
|00000330| 6e 65 77 64 69 6d 65 6e | 5c 72 65 61 6c 76 73 69 |newdimen|\realvsi|
|00000340| 7a 65 0d 0a 5c 6e 65 77 | 64 69 6d 65 6e 5c 70 61 |ze..\new|dimen\pa|
|00000350| 67 65 68 65 69 67 68 74 | 20 5c 6e 65 77 64 69 6d |geheight| \newdim|
|00000360| 65 6e 5c 70 61 67 65 77 | 69 64 74 68 0d 0a 5c 70 |en\pagew|idth..\p|
|00000370| 61 67 65 68 65 69 67 68 | 74 3d 5c 76 73 69 7a 65 |ageheigh|t=\vsize|
|00000380| 20 20 20 5c 70 61 67 65 | 77 69 64 74 68 3d 5c 68 | \page|width=\h|
|00000390| 73 69 7a 65 0d 0a 5c 72 | 65 61 6c 68 73 69 7a 65 |size..\r|ealhsize|
|000003a0| 3d 5c 68 73 69 7a 65 0d | 0a 5c 72 65 61 6c 76 73 |=\hsize.|.\realvs|
|000003b0| 69 7a 65 3d 5c 76 73 69 | 7a 65 0d 0a 5c 6e 65 77 |ize=\vsi|ze..\new|
|000003c0| 69 66 5c 69 66 74 69 74 | 6c 65 0d 0a 5c 6e 65 77 |if\iftit|le..\new|
|000003d0| 69 66 5c 69 66 63 68 61 | 70 74 65 72 0d 0a 5c 64 |if\ifcha|pter..\d|
|000003e0| 65 66 5c 72 66 6f 6f 74 | 7b 5c 72 65 6c 61 78 7d |ef\rfoot|{\relax}|
|000003f0| 0d 0a 5c 64 65 66 5c 66 | 6f 6f 74 6c 69 6e 65 7b |..\def\f|ootline{|
|00000400| 25 0d 0a 20 5c 69 66 6f | 64 64 5c 70 61 67 65 6e |%.. \ifo|dd\pagen|
|00000410| 6f 5c 72 69 67 68 74 66 | 6f 6f 74 6c 69 6e 65 20 |o\rightf|ootline |
|00000420| 5c 65 6c 73 65 5c 6c 65 | 66 74 66 6f 6f 74 6c 69 |\else\le|ftfootli|
|00000430| 6e 65 5c 66 69 7d 0d 0a | 5c 64 65 66 5c 72 69 67 |ne\fi}..|\def\rig|
|00000440| 68 74 66 6f 6f 74 6c 69 | 6e 65 7b 5c 68 62 6f 78 |htfootli|ne{\hbox|
|00000450| 20 74 6f 5c 72 65 61 6c | 68 73 69 7a 65 7b 25 0d | to\real|hsize{%.|
|00000460| 0a 20 20 5c 76 62 6f 78 | 20 74 6f 20 31 30 70 74 |. \vbox| to 10pt|
|00000470| 7b 7d 7b 5c 74 65 6e 72 | 6d 5c 68 66 69 6c 5c 72 |{}{\tenr|m\hfil\r|
|00000480| 66 6f 6f 74 5c 68 73 6b | 69 70 30 2e 35 69 6e 5c |foot\hsk|ip0.5in\|
|00000490| 66 6f 6c 69 6f 7d 7d 7d | 0d 0a 5c 64 65 66 5c 6c |folio}}}|..\def\l|
|000004a0| 65 66 74 66 6f 6f 74 6c | 69 6e 65 7b 5c 68 62 6f |eftfootl|ine{\hbo|
|000004b0| 78 20 74 6f 20 5c 72 65 | 61 6c 68 73 69 7a 65 7b |x to \re|alhsize{|
|000004c0| 25 0d 0a 20 20 5c 76 62 | 6f 78 20 74 6f 20 31 30 |%.. \vb|ox to 10|
|000004d0| 70 74 7b 7d 7b 5c 74 65 | 6e 72 6d 5c 66 6f 6c 69 |pt{}{\te|nrm\foli|
|000004e0| 6f 5c 68 73 6b 69 70 30 | 2e 35 69 6e 5c 72 74 69 |o\hskip0|.5in\rti|
|000004f0| 74 6c 65 5c 68 66 69 6c | 7d 7d 7d 0d 0a 5c 64 65 |tle\hfil|}}}..\de|
|00000500| 66 5c 63 68 66 6f 6f 74 | 7b 25 0d 0a 20 5c 69 66 |f\chfoot|{%.. \if|
|00000510| 6f 64 64 5c 70 61 67 65 | 6e 6f 5c 72 69 67 68 74 |odd\page|no\right|
|00000520| 63 68 66 6f 6f 74 20 5c | 65 6c 73 65 5c 6c 65 66 |chfoot \|else\lef|
|00000530| 74 63 68 66 6f 6f 74 5c | 66 69 7d 0d 0a 5c 64 65 |tchfoot\|fi}..\de|
|00000540| 66 5c 72 69 67 68 74 63 | 68 66 6f 6f 74 7b 5c 68 |f\rightc|hfoot{\h|
|00000550| 62 6f 78 20 74 6f 5c 72 | 65 61 6c 68 73 69 7a 65 |box to\r|ealhsize|
|00000560| 7b 25 0d 0a 20 20 5c 76 | 62 6f 78 20 74 6f 20 31 |{%.. \v|box to 1|
|00000570| 30 70 74 7b 7d 7b 5c 74 | 65 6e 72 6d 5c 68 66 69 |0pt{}{\t|enrm\hfi|
|00000580| 6c 5c 66 6f 6c 69 6f 7d | 7d 7d 0d 0a 5c 64 65 66 |l\folio}|}}..\def|
|00000590| 5c 6c 65 66 74 63 68 66 | 6f 6f 74 7b 5c 68 62 6f |\leftchf|oot{\hbo|
|000005a0| 78 20 74 6f 20 5c 72 65 | 61 6c 68 73 69 7a 65 7b |x to \re|alhsize{|
|000005b0| 25 0d 0a 20 20 5c 76 62 | 6f 78 20 74 6f 20 31 30 |%.. \vb|ox to 10|
|000005c0| 70 74 7b 7d 7b 5c 74 65 | 6e 72 6d 5c 66 6f 6c 69 |pt{}{\te|nrm\foli|
|000005d0| 6f 5c 68 73 6b 69 70 30 | 2e 35 69 6e 5c 72 74 69 |o\hskip0|.5in\rti|
|000005e0| 74 6c 65 5c 68 66 69 6c | 7d 7d 7d 0d 0a 20 20 0d |tle\hfil|}}}.. .|
|000005f0| 0a 5c 64 65 66 5c 72 74 | 69 74 6c 65 7b 7b 5c 62 |.\def\rt|itle{{\b|
|00000600| 66 20 54 41 44 53 3a 20 | 54 68 65 20 54 65 78 74 |f TADS: |The Text|
|00000610| 20 41 64 76 65 6e 74 75 | 72 65 20 44 65 76 65 6c | Adventu|re Devel|
|00000620| 6f 70 6d 65 6e 74 20 53 | 79 73 74 65 6d 7d 7d 0d |opment S|ystem}}.|
|00000630| 0a 0d 0a 5c 64 65 66 5c | 6f 6e 65 70 61 67 65 6f |...\def\|onepageo|
|00000640| 75 74 23 31 7b 5c 73 68 | 69 70 6f 75 74 5c 76 62 |ut#1{\sh|ipout\vb|
|00000650| 6f 78 7b 0d 0a 20 20 5c | 6f 66 66 69 6e 74 65 72 |ox{.. \|offinter|
|00000660| 6c 69 6e 65 73 6b 69 70 | 0d 0a 20 20 5c 76 62 6f |lineskip|.. \vbo|
|00000670| 78 20 74 6f 5c 70 61 67 | 65 68 65 69 67 68 74 7b |x to\pag|eheight{|
|00000680| 23 31 7d 0d 0a 20 20 5c | 76 62 6f 78 20 74 6f 20 |#1}.. \|vbox to |
|00000690| 33 70 63 7b 5c 76 66 69 | 6c 6c 5c 69 66 74 69 74 |3pc{\vfi|ll\iftit|
|000006a0| 6c 65 5c 67 6c 6f 62 61 | 6c 5c 74 69 74 6c 65 66 |le\globa|l\titlef|
|000006b0| 61 6c 73 65 5c 65 6c 73 | 65 25 0d 0a 20 20 5c 69 |alse\els|e%.. \i|
|000006c0| 66 63 68 61 70 74 65 72 | 5c 63 68 66 6f 6f 74 5c |fchapter|\chfoot\|
|000006d0| 67 6c 6f 62 61 6c 5c 63 | 68 61 70 74 65 72 66 61 |global\c|hapterfa|
|000006e0| 6c 73 65 5c 65 6c 73 65 | 5c 66 6f 6f 74 6c 69 6e |lse\else|\footlin|
|000006f0| 65 5c 66 69 5c 66 69 25 | 0d 0a 5c 62 6f 78 6d 61 |e\fi\fi%|..\boxma|
|00000700| 78 64 65 70 74 68 3d 5c | 6d 61 78 64 65 70 74 68 |xdepth=\|maxdepth|
|00000710| 7d 7d 0d 0a 5c 61 64 76 | 61 6e 63 65 70 61 67 65 |}}..\adv|ancepage|
|00000720| 6e 6f 0d 0a 7d 0d 0a 0d | 0a 5c 6f 75 74 70 75 74 |no..}...|.\output|
|00000730| 7b 5c 6f 6e 65 70 61 67 | 65 6f 75 74 7b 5c 75 6e |{\onepag|eout{\un|
|00000740| 76 62 6f 78 32 35 35 7d | 7d 0d 0a 0d 0a 5c 64 65 |vbox255}|}....\de|
|00000750| 66 5c 72 66 6f 6f 74 7b | 7b 5c 74 65 6e 69 74 20 |f\rfoot{|{\tenit |
|00000760| 56 65 72 73 69 6f 6e 20 | 32 2e 31 20 52 65 6c 65 |Version |2.1 Rele|
|00000770| 61 73 65 20 4e 6f 74 65 | 73 7d 7d 0d 0a 0d 0a 25 |ase Note|s}}....%|
|00000780| 20 76 61 72 69 6f 75 73 | 20 6f 74 68 65 72 20 6d | various| other m|
|00000790| 61 63 72 6f 73 20 73 74 | 6f 6c 65 6e 20 66 72 6f |acros st|olen fro|
|000007a0| 6d 20 74 61 64 73 64 65 | 66 2e 74 65 78 0d 0a 5c |m tadsde|f.tex..\|
|000007b0| 64 65 66 5c 65 78 61 6d | 70 6c 65 7b 5c 74 74 5c |def\exam|ple{\tt\|
|000007c0| 70 61 72 73 6b 69 70 3d | 30 70 74 5c 6f 62 65 79 |parskip=|0pt\obey|
|000007d0| 6c 69 6e 65 73 5c 6d 65 | 64 73 6b 69 70 5c 61 64 |lines\me|dskip\ad|
|000007e0| 76 61 6e 63 65 5c 6c 65 | 66 74 73 6b 69 70 31 65 |vance\le|ftskip1e|
|000007f0| 6d 5c 76 73 6b 69 70 30 | 69 6e 7d 0d 0a 5c 64 65 |m\vskip0|in}..\de|
|00000800| 66 5c 6f 62 6a 65 63 74 | 23 31 7b 23 31 5c 76 73 |f\object|#1{#1\vs|
|00000810| 6b 69 70 30 69 6e 5c 61 | 64 76 61 6e 63 65 5c 6c |kip0in\a|dvance\l|
|00000820| 65 66 74 73 6b 69 70 31 | 65 6d 5c 76 73 6b 69 70 |eftskip1|em\vskip|
|00000830| 30 69 6e 7d 0d 0a 5c 64 | 65 66 5c 65 6e 64 6f 62 |0in}..\d|ef\endob|
|00000840| 6a 7b 5c 76 73 6b 69 70 | 30 69 6e 5c 61 64 76 61 |j{\vskip|0in\adva|
|00000850| 6e 63 65 5c 6c 65 66 74 | 73 6b 69 70 2d 31 65 6d |nce\left|skip-1em|
|00000860| 20 3b 5c 6d 65 64 73 6b | 69 70 7d 0d 0a 5c 64 65 | ;\medsk|ip}..\de|
|00000870| 66 5c 6c 62 7b 5c 63 68 | 61 72 60 5c 7b 5c 76 73 |f\lb{\ch|ar`\{\vs|
|00000880| 6b 69 70 30 69 6e 5c 61 | 64 76 61 6e 63 65 5c 6c |kip0in\a|dvance\l|
|00000890| 65 66 74 73 6b 69 70 31 | 65 6d 5c 76 73 6b 69 70 |eftskip1|em\vskip|
|000008a0| 30 69 6e 7d 0d 0a 5c 64 | 65 66 5c 72 62 7b 5c 76 |0in}..\d|ef\rb{\v|
|000008b0| 73 6b 69 70 30 69 6e 5c | 61 64 76 61 6e 63 65 5c |skip0in\|advance\|
|000008c0| 6c 65 66 74 73 6b 69 70 | 2d 31 65 6d 5c 63 68 61 |leftskip|-1em\cha|
|000008d0| 72 60 5c 7d 5c 76 73 6b | 69 70 30 69 6e 7d 0d 0a |r`\}\vsk|ip0in}..|
|000008e0| 5c 64 65 66 5c 69 6e 76 | 69 73 6c 62 7b 5c 76 73 |\def\inv|islb{\vs|
|000008f0| 6b 69 70 30 69 6e 5c 61 | 64 76 61 6e 63 65 5c 6c |kip0in\a|dvance\l|
|00000900| 65 66 74 73 6b 69 70 31 | 65 6d 5c 76 73 6b 69 70 |eftskip1|em\vskip|
|00000910| 30 69 6e 7d 0d 0a 5c 64 | 65 66 5c 69 6e 76 69 73 |0in}..\d|ef\invis|
|00000920| 72 62 7b 5c 76 73 6b 69 | 70 30 69 6e 5c 61 64 76 |rb{\vski|p0in\adv|
|00000930| 61 6e 63 65 5c 6c 65 66 | 74 73 6b 69 70 2d 31 65 |ance\lef|tskip-1e|
|00000940| 6d 5c 76 73 6b 69 70 30 | 69 6e 7d 0d 0a 5c 63 68 |m\vskip0|in}..\ch|
|00000950| 61 72 64 65 66 5c 62 73 | 6c 61 73 68 3d 60 5c 5c |ardef\bs|lash=`\\|
|00000960| 0d 0a 0d 0a 0d 0a 5c 74 | 6f 70 69 63 20 49 6e 74 |......\t|opic Int|
|00000970| 72 6f 64 75 63 74 69 6f | 6e 0d 0a 0d 0a 53 69 6e |roductio|n....Sin|
|00000980| 63 65 20 74 68 65 20 69 | 6e 69 74 69 61 6c 20 72 |ce the i|nitial r|
|00000990| 65 6c 65 61 73 65 20 6f | 66 20 54 41 44 53 20 76 |elease o|f TADS v|
|000009a0| 65 72 73 69 6f 6e 20 32 | 2e 30 2c 20 77 65 20 68 |ersion 2|.0, we h|
|000009b0| 61 76 65 20 66 69 78 65 | 64 20 6d 61 6e 79 0d 0a |ave fixe|d many..|
|000009c0| 70 72 6f 62 6c 65 6d 73 | 20 74 68 61 74 20 75 73 |problems| that us|
|000009d0| 65 72 73 20 68 61 76 65 | 20 65 6e 63 6f 75 6e 74 |ers have| encount|
|000009e0| 65 72 65 64 2c 20 61 6e | 64 20 68 61 76 65 20 61 |ered, an|d have a|
|000009f0| 64 64 65 64 20 6d 61 6e | 79 20 6e 65 77 20 66 65 |dded man|y new fe|
|00000a00| 61 74 75 72 65 73 2e 0d | 0a 57 65 20 68 61 76 65 |atures..|.We have|
|00000a10| 6e 27 74 20 79 65 74 20 | 75 70 64 61 74 65 64 20 |n't yet |updated |
|00000a20| 74 68 65 20 54 41 44 53 | 20 32 2e 30 20 41 75 74 |the TADS| 2.0 Aut|
|00000a30| 68 6f 72 27 73 20 4d 61 | 6e 75 61 6c 20 74 6f 20 |hor's Ma|nual to |
|00000a40| 69 6e 63 6c 75 64 65 0d | 0a 64 6f 63 75 6d 65 6e |include.|.documen|
|00000a50| 74 61 74 69 6f 6e 20 6f | 66 20 74 68 65 20 6e 65 |tation o|f the ne|
|00000a60| 77 20 66 65 61 74 75 72 | 65 73 2c 20 73 6f 20 77 |w featur|es, so w|
|00000a70| 65 27 76 65 20 70 72 65 | 70 61 72 65 64 20 74 68 |e've pre|pared th|
|00000a80| 69 73 20 73 65 74 20 6f | 66 0d 0a 72 65 6c 65 61 |is set o|f..relea|
|00000a90| 73 65 20 6e 6f 74 65 73 | 20 74 6f 20 70 72 6f 76 |se notes| to prov|
|00000aa0| 69 64 65 20 64 65 74 61 | 69 6c 73 20 6f 6e 20 74 |ide deta|ils on t|
|00000ab0| 68 65 20 61 64 64 69 74 | 69 6f 6e 73 20 61 6e 64 |he addit|ions and|
|00000ac0| 20 63 68 61 6e 67 65 73 | 2e 0d 0a 4d 61 6e 79 20 | changes|...Many |
|00000ad0| 6f 66 20 74 68 65 20 66 | 65 61 74 75 72 65 73 20 |of the f|eatures |
|00000ae0| 69 6e 20 54 41 44 53 20 | 76 65 72 73 69 6f 6e 20 |in TADS |version |
|00000af0| 32 2e 31 20 77 65 72 65 | 20 61 64 64 65 64 20 69 |2.1 were| added i|
|00000b00| 6e 20 6f 6e 65 20 6f 66 | 0d 0a 74 68 65 20 65 61 |n one of|..the ea|
|00000b10| 72 6c 69 65 72 20 32 2e | 30 2e 7b 5c 69 74 20 78 |rlier 2.|0.{\it x|
|00000b20| 7d 20 6d 61 69 6e 74 65 | 6e 61 6e 63 65 20 72 65 |} mainte|nance re|
|00000b30| 6c 65 61 73 65 73 2c 20 | 73 6f 20 79 6f 75 20 6d |leases, |so you m|
|00000b40| 61 79 20 68 61 76 65 20 | 73 65 65 6e 0d 0a 73 6f |ay have |seen..so|
|00000b50| 6d 65 20 6f 66 20 74 68 | 65 20 69 6e 66 6f 72 6d |me of th|e inform|
|00000b60| 61 74 69 6f 6e 20 69 6e | 20 74 68 65 73 65 20 72 |ation in| these r|
|00000b70| 65 6c 65 61 73 65 20 6e | 6f 74 65 73 20 62 65 66 |elease n|otes bef|
|00000b80| 6f 72 65 2e 0d 0a 0d 0a | 54 68 65 20 54 41 44 53 |ore.....|The TADS|
|00000b90| 20 32 2e 30 20 41 75 74 | 68 6f 72 27 73 20 4d 61 | 2.0 Aut|hor's Ma|
|00000ba0| 6e 75 61 6c 20 72 65 6d | 61 69 6e 73 20 74 68 65 |nual rem|ains the|
|00000bb0| 20 70 72 69 6d 61 72 79 | 20 64 6f 63 75 6d 65 6e | primary| documen|
|00000bc0| 74 61 74 69 6f 6e 20 66 | 6f 72 0d 0a 74 68 65 20 |tation f|or..the |
|00000bd0| 73 79 73 74 65 6d 2e 20 | 20 57 65 20 68 61 76 65 |system. | We have|
|00000be0| 20 74 72 69 65 64 20 74 | 6f 20 65 6e 73 75 72 65 | tried t|o ensure|
|00000bf0| 20 74 68 61 74 20 74 68 | 65 20 63 68 61 6e 67 65 | that th|e change|
|00000c00| 73 20 77 65 27 76 65 20 | 6d 61 64 65 0d 0a 6d 61 |s we've |made..ma|
|00000c10| 69 6e 74 61 69 6e 20 63 | 6f 6d 70 61 74 69 62 69 |intain c|ompatibi|
|00000c20| 6c 69 74 79 20 77 69 74 | 68 20 70 72 65 76 69 6f |lity wit|h previo|
|00000c30| 75 73 20 76 65 72 73 69 | 6f 6e 73 2c 20 77 68 69 |us versi|ons, whi|
|00000c40| 63 68 20 6d 65 61 6e 73 | 20 74 68 61 74 0d 0a 74 |ch means| that..t|
|00000c50| 68 65 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 20 69 |he infor|mation i|
|00000c60| 6e 20 74 68 65 20 41 75 | 74 68 6f 72 27 73 20 4d |n the Au|thor's M|
|00000c70| 61 6e 75 61 6c 20 69 73 | 20 73 74 69 6c 6c 20 6d |anual is| still m|
|00000c80| 6f 73 74 6c 79 20 63 6f | 72 72 65 63 74 2e 0d 0a |ostly co|rrect...|
|00000c90| 0d 0a 59 6f 75 20 6d 61 | 79 20 6e 6f 74 69 63 65 |..You ma|y notice|
|00000ca0| 20 74 68 61 74 20 74 68 | 65 20 54 41 44 53 20 76 | that th|e TADS v|
|00000cb0| 65 72 73 69 6f 6e 20 6e | 75 6d 62 65 72 73 20 64 |ersion n|umbers d|
|00000cc0| 69 73 70 6c 61 79 65 64 | 20 62 79 20 74 68 65 20 |isplayed| by the |
|00000cd0| 63 6f 6d 70 69 6c 65 72 | 2c 0d 0a 72 75 6e 2d 74 |compiler|,..run-t|
|00000ce0| 69 6d 65 2c 20 61 6e 64 | 20 64 65 62 75 67 67 65 |ime, and| debugge|
|00000cf0| 72 20 6e 6f 77 20 68 61 | 76 65 20 67 72 65 61 74 |r now ha|ve great|
|00000d00| 65 72 20 70 72 65 63 69 | 73 69 6f 6e 20 74 68 61 |er preci|sion tha|
|00000d10| 6e 20 69 6e 20 74 68 65 | 0d 0a 70 61 73 74 3a 20 |n in the|..past: |
|00000d20| 74 68 65 20 76 65 72 73 | 69 6f 6e 20 6e 75 6d 62 |the vers|ion numb|
|00000d30| 65 72 73 20 6e 6f 77 20 | 68 61 76 65 20 7b 5c 69 |ers now |have {\i|
|00000d40| 74 20 66 6f 75 72 7d 20 | 70 61 72 74 73 2e 20 20 |t four} |parts. |
|00000d50| 54 68 65 20 6e 65 77 0d | 0a 66 6f 75 72 74 68 20 |The new.|.fourth |
|00000d60| 6e 75 6d 62 65 72 20 69 | 6e 64 69 63 61 74 65 73 |number i|ndicates|
|00000d70| 20 74 68 65 20 70 6c 61 | 74 66 6f 72 6d 2d 73 70 | the pla|tform-sp|
|00000d80| 65 63 69 66 69 63 20 72 | 65 6c 65 61 73 65 20 6c |ecific r|elease l|
|00000d90| 65 76 65 6c 2e 0d 0a 50 | 6c 61 74 66 6f 72 6d 2d |evel...P|latform-|
|00000da0| 73 70 65 63 69 66 69 63 | 20 72 65 6c 65 61 73 65 |specific| release|
|00000db0| 73 20 77 69 6c 6c 20 62 | 65 20 6d 61 64 65 0d 0a |s will b|e made..|
|00000dc0| 6f 6e 6c 79 20 74 6f 20 | 63 6f 72 72 65 63 74 20 |only to |correct |
|00000dd0| 70 72 6f 62 6c 65 6d 73 | 20 73 70 65 63 69 66 69 |problems| specifi|
|00000de0| 63 20 74 6f 20 61 20 70 | 61 72 74 69 63 75 6c 61 |c to a p|articula|
|00000df0| 72 20 70 6f 72 74 20 6f | 66 20 54 41 44 53 2c 0d |r port o|f TADS,.|
|00000e00| 0a 61 6e 64 20 77 69 6c | 6c 20 6e 6f 74 20 69 6e |.and wil|l not in|
|00000e10| 76 6f 6c 76 65 20 61 6e | 79 20 63 68 61 6e 67 65 |volve an|y change|
|00000e20| 73 20 69 6e 20 74 68 65 | 20 6c 61 6e 67 75 61 67 |s in the| languag|
|00000e30| 65 2c 20 66 65 61 74 75 | 72 65 73 2c 20 6f 72 0d |e, featu|res, or.|
|00000e40| 0a 66 69 6c 65 20 66 6f | 72 6d 61 74 73 2e 0d 0a |.file fo|rmats...|
|00000e50| 0d 0a 5c 74 6f 70 69 63 | 20 4e 65 77 20 6b 65 79 |..\topic| New key|
|00000e60| 77 6f 72 64 73 3a 20 7b | 5c 74 74 20 72 65 70 6c |words: {|\tt repl|
|00000e70| 61 63 65 7d 20 61 6e 64 | 20 7b 5c 74 74 20 6d 6f |ace} and| {\tt mo|
|00000e80| 64 69 66 79 7d 0d 0a 0d | 0a 4d 6f 73 74 20 67 61 |dify}...|.Most ga|
|00000e90| 6d 65 20 61 75 74 68 6f | 72 73 20 66 69 6e 64 20 |me autho|rs find |
|00000ea0| 74 68 61 74 20 74 68 65 | 79 20 63 61 6e 27 74 20 |that the|y can't |
|00000eb0| 61 76 6f 69 64 20 6d 6f | 64 69 66 79 69 6e 67 20 |avoid mo|difying |
|00000ec0| 7b 5c 74 74 20 61 64 76 | 2e 74 7d 0d 0a 69 6e 20 |{\tt adv|.t}..in |
|00000ed0| 74 68 65 20 63 6f 75 72 | 73 65 20 6f 66 20 77 72 |the cour|se of wr|
|00000ee0| 69 74 69 6e 67 20 74 68 | 65 69 72 20 67 61 6d 65 |iting th|eir game|
|00000ef0| 73 2e 20 20 57 68 69 6c | 65 20 74 68 65 72 65 27 |s. Whil|e there'|
|00000f00| 73 20 6e 6f 74 68 69 6e | 67 20 69 6e 74 72 69 6e |s nothin|g intrin|
|00000f10| 73 69 63 61 6c 6c 79 0d | 0a 77 72 6f 6e 67 20 77 |sically.|.wrong w|
|00000f20| 69 74 68 20 74 68 69 73 | 2c 20 69 74 20 63 72 65 |ith this|, it cre|
|00000f30| 61 74 65 73 20 61 20 70 | 72 6f 62 6c 65 6d 20 77 |ates a p|roblem w|
|00000f40| 68 65 6e 20 61 20 6e 65 | 77 20 76 65 72 73 69 6f |hen a ne|w versio|
|00000f50| 6e 20 6f 66 20 54 41 44 | 53 20 69 73 0d 0a 72 65 |n of TAD|S is..re|
|00000f60| 6c 65 61 73 65 64 3a 20 | 20 74 68 65 20 67 61 6d |leased: | the gam|
|00000f70| 65 20 61 75 74 68 6f 72 | 20 6d 75 73 74 20 65 69 |e author| must ei|
|00000f80| 74 68 65 72 20 63 6f 6e | 74 69 6e 75 65 20 74 6f |ther con|tinue to|
|00000f90| 20 75 73 65 20 74 68 65 | 20 6f 6c 64 20 76 65 72 | use the| old ver|
|00000fa0| 73 69 6f 6e 0d 0a 6f 66 | 20 7b 5c 74 74 20 61 64 |sion..of| {\tt ad|
|00000fb0| 76 2e 74 7d 2c 20 77 68 | 69 63 68 20 6d 65 61 6e |v.t}, wh|ich mean|
|00000fc0| 73 20 74 68 61 74 20 61 | 6e 79 20 62 75 67 20 66 |s that a|ny bug f|
|00000fd0| 69 78 65 73 20 6f 72 20 | 65 6e 68 61 6e 63 65 6d |ixes or |enhancem|
|00000fe0| 65 6e 74 73 20 69 6e 20 | 74 68 65 0d 0a 6e 65 77 |ents in |the..new|
|00000ff0| 20 76 65 72 73 69 6f 6e | 20 61 72 65 20 6e 6f 74 | version| are not|
|00001000| 20 61 76 61 69 6c 61 62 | 6c 65 2c 20 6f 72 20 74 | availab|le, or t|
|00001010| 61 6b 65 20 74 68 65 20 | 74 69 6d 65 20 74 6f 20 |ake the |time to |
|00001020| 72 65 63 6f 6e 63 69 6c | 65 20 74 68 65 20 61 75 |reconcil|e the au|
|00001030| 74 68 6f 72 27 73 0d 0a | 63 68 61 6e 67 65 73 20 |thor's..|changes |
|00001040| 74 6f 20 74 68 65 20 66 | 69 6c 65 20 77 69 74 68 |to the f|ile with|
|00001050| 20 74 68 6f 73 65 20 6d | 61 64 65 20 69 6e 20 74 | those m|ade in t|
|00001060| 68 65 20 73 74 61 6e 64 | 61 72 64 20 76 65 72 73 |he stand|ard vers|
|00001070| 69 6f 6e 2e 0d 0a 0d 0a | 57 65 20 63 61 6e 27 74 |ion.....|We can't|
|00001080| 20 64 6f 20 61 6e 79 74 | 68 69 6e 67 20 74 6f 20 | do anyt|hing to |
|00001090| 68 65 6c 70 20 79 6f 75 | 20 77 69 74 68 20 63 68 |help you| with ch|
|000010a0| 61 6e 67 65 73 20 79 6f | 75 27 76 65 20 6d 61 64 |anges yo|u've mad|
|000010b0| 65 20 74 6f 0d 0a 7b 5c | 74 74 20 61 64 76 2e 74 |e to..{\|tt adv.t|
|000010c0| 7d 20 70 72 69 6f 72 20 | 74 6f 20 54 41 44 53 20 |} prior |to TADS |
|000010d0| 76 65 72 73 69 6f 6e 20 | 32 2e 31 2c 20 62 75 74 |version |2.1, but|
|000010e0| 20 77 65 20 6d 61 79 20 | 62 65 20 61 62 6c 65 20 | we may |be able |
|000010f0| 74 6f 20 70 72 65 76 65 | 6e 74 0d 0a 74 68 69 73 |to preve|nt..this|
|00001100| 20 66 72 6f 6d 20 62 65 | 69 6e 67 20 61 20 70 72 | from be|ing a pr|
|00001110| 6f 62 6c 65 6d 20 69 6e | 20 74 68 65 20 66 75 74 |oblem in| the fut|
|00001120| 75 72 65 2c 20 74 68 61 | 6e 6b 73 20 74 6f 20 74 |ure, tha|nks to t|
|00001130| 68 65 20 6e 65 77 20 7b | 5c 74 74 20 72 65 70 6c |he new {|\tt repl|
|00001140| 61 63 65 7d 0d 0a 61 6e | 64 20 7b 5c 74 74 20 6d |ace}..an|d {\tt m|
|00001150| 6f 64 69 66 79 7d 20 6d | 65 63 68 61 6e 69 73 6d |odify} m|echanism|
|00001160| 2e 0d 0a 0d 0a 54 68 65 | 73 65 20 6e 65 77 20 6b |.....The|se new k|
|00001170| 65 79 77 6f 72 64 73 20 | 61 6c 6c 6f 77 20 79 6f |eywords |allow yo|
|00001180| 75 20 74 6f 20 6d 61 6b | 65 20 63 68 61 6e 67 65 |u to mak|e change|
|00001190| 73 20 74 6f 20 6f 62 6a | 65 63 74 73 20 74 68 61 |s to obj|ects tha|
|000011a0| 74 20 68 61 76 65 0d 0a | 62 65 65 6e 20 70 72 65 |t have..|been pre|
|000011b0| 76 69 6f 75 73 6c 79 20 | 64 65 66 69 6e 65 64 2e |viously |defined.|
|000011c0| 20 20 49 6e 20 6f 74 68 | 65 72 20 77 6f 72 64 73 | In oth|er words|
|000011d0| 2c 20 79 6f 75 20 63 61 | 6e 20 7b 5c 74 74 20 5c |, you ca|n {\tt \|
|000011e0| 23 69 6e 63 6c 75 64 65 | 7d 20 74 68 65 20 73 74 |#include|} the st|
|000011f0| 61 6e 64 61 72 64 0d 0a | 7b 5c 74 74 20 61 64 76 |andard..|{\tt adv|
|00001200| 2e 74 7d 20 66 69 6c 65 | 2c 20 61 6e 64 20 74 68 |.t} file|, and th|
|00001210| 65 6e 20 6d 61 6b 65 20 | 63 68 61 6e 67 65 73 20 |en make |changes |
|00001220| 74 6f 20 74 68 65 20 6f | 62 6a 65 63 74 73 20 74 |to the o|bjects t|
|00001230| 68 61 74 20 74 68 65 20 | 63 6f 6d 70 69 6c 65 72 |hat the |compiler|
|00001240| 0d 0a 68 61 73 20 7b 5c | 69 74 20 61 6c 72 65 61 |..has {\|it alrea|
|00001250| 64 79 5c 2f 7d 20 66 69 | 6e 69 73 68 65 64 20 63 |dy\/} fi|nished c|
|00001260| 6f 6d 70 69 6c 69 6e 67 | 2e 20 20 55 73 69 6e 67 |ompiling|. Using|
|00001270| 20 74 68 65 73 65 20 6e | 65 77 20 6b 65 79 77 6f | these n|ew keywo|
|00001280| 72 64 73 2c 20 79 6f 75 | 0d 0a 63 61 6e 20 6d 61 |rds, you|..can ma|
|00001290| 6b 65 20 74 68 72 65 65 | 20 74 79 70 65 73 20 6f |ke three| types o|
|000012a0| 66 20 63 68 61 6e 67 65 | 73 20 74 6f 20 70 72 65 |f change|s to pre|
|000012b0| 76 69 6f 75 73 6c 79 2d | 64 65 66 69 6e 65 64 20 |viously-|defined |
|000012c0| 6f 62 6a 65 63 74 73 3a | 20 20 79 6f 75 0d 0a 63 |objects:| you..c|
|000012d0| 61 6e 20 72 65 70 6c 61 | 63 65 20 61 20 66 75 6e |an repla|ce a fun|
|000012e0| 63 74 69 6f 6e 20 65 6e | 74 69 72 65 6c 79 2c 20 |ction en|tirely, |
|000012f0| 79 6f 75 20 63 61 6e 20 | 72 65 70 6c 61 63 65 20 |you can |replace |
|00001300| 61 6e 20 6f 62 6a 65 63 | 74 20 65 6e 74 69 72 65 |an objec|t entire|
|00001310| 6c 79 2c 0d 0a 6f 72 20 | 79 6f 75 20 63 61 6e 20 |ly,..or |you can |
|00001320| 61 64 64 20 74 6f 20 6f | 72 20 63 68 61 6e 67 65 |add to o|r change|
|00001330| 20 74 68 65 20 6d 65 74 | 68 6f 64 73 20 61 6c 72 | the met|hods alr|
|00001340| 65 61 64 79 20 64 65 66 | 69 6e 65 64 20 69 6e 20 |eady def|ined in |
|00001350| 61 6e 20 6f 62 6a 65 63 | 74 2e 0d 0a 0d 0a 54 6f |an objec|t.....To|
|00001360| 20 72 65 70 6c 61 63 65 | 20 61 20 66 75 6e 63 74 | replace| a funct|
|00001370| 69 6f 6e 20 74 68 61 74 | 27 73 20 61 6c 72 65 61 |ion that|'s alrea|
|00001380| 64 79 20 62 65 65 6e 20 | 64 65 66 69 6e 65 64 2c |dy been |defined,|
|00001390| 20 79 6f 75 20 73 69 6d | 70 6c 79 20 70 72 65 66 | you sim|ply pref|
|000013a0| 61 63 65 0d 0a 79 6f 75 | 72 20 72 65 70 6c 61 63 |ace..you|r replac|
|000013b0| 65 6d 65 6e 74 20 64 65 | 66 69 6e 69 74 69 6f 6e |ement de|finition|
|000013c0| 20 77 69 74 68 20 74 68 | 65 20 6b 65 79 77 6f 72 | with th|e keywor|
|000013d0| 64 20 7b 5c 74 74 20 72 | 65 70 6c 61 63 65 7d 2e |d {\tt r|eplace}.|
|000013e0| 20 20 46 6f 6c 6c 6f 77 | 69 6e 67 0d 0a 74 68 65 | Follow|ing..the|
|000013f0| 20 6b 65 79 77 6f 72 64 | 20 7b 5c 74 74 20 72 65 | keyword| {\tt re|
|00001400| 70 6c 61 63 65 7d 20 69 | 73 20 61 6e 20 6f 74 68 |place} i|s an oth|
|00001410| 65 72 77 69 73 65 20 6e | 6f 72 6d 61 6c 20 66 75 |erwise n|ormal fu|
|00001420| 6e 63 74 69 6f 6e 20 64 | 65 66 69 6e 69 74 69 6f |nction d|efinitio|
|00001430| 6e 2e 0d 0a 54 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |n...The |followin|
|00001440| 67 20 65 78 61 6d 70 6c | 65 20 72 65 70 6c 61 63 |g exampl|e replac|
|00001450| 65 73 20 74 68 65 20 7b | 5c 74 74 20 73 63 6f 72 |es the {|\tt scor|
|00001460| 65 53 74 61 74 75 73 7d | 20 66 75 6e 63 74 69 6f |eStatus}| functio|
|00001470| 6e 20 64 65 66 69 6e 65 | 64 20 69 6e 0d 0a 7b 5c |n define|d in..{\|
|00001480| 74 74 20 61 64 76 2e 74 | 7d 20 77 69 74 68 20 61 |tt adv.t|} with a|
|00001490| 20 6e 65 77 20 66 75 6e | 63 74 69 6f 6e 20 74 68 | new fun|ction th|
|000014a0| 61 74 20 63 75 73 74 6f | 6d 69 7a 65 73 20 74 68 |at custo|mizes th|
|000014b0| 65 20 73 74 61 74 75 73 | 20 6c 69 6e 65 20 73 63 |e status| line sc|
|000014c0| 6f 72 65 0d 0a 64 69 73 | 70 6c 61 79 2e 0d 0a 0d |ore..dis|play....|
|000014d0| 0a 7b 5c 65 78 61 6d 70 | 6c 65 0d 0a 5c 23 69 6e |.{\examp|le..\#in|
|000014e0| 63 6c 75 64 65 20 3c 61 | 64 76 2e 74 3e 0d 0a 5c |clude <a|dv.t>..\|
|000014f0| 76 73 6b 69 70 31 31 70 | 74 0d 0a 72 65 70 6c 61 |vskip11p|t..repla|
|00001500| 63 65 20 73 63 6f 72 65 | 53 74 61 74 75 73 28 70 |ce score|Status(p|
|00001510| 6f 69 6e 74 73 2c 20 74 | 75 72 6e 73 29 0d 0a 5c |oints, t|urns)..\|
|00001520| 6c 62 0d 0a 20 20 20 73 | 65 74 73 63 6f 72 65 28 |lb.. s|etscore(|
|00001530| 63 76 74 73 74 72 28 70 | 74 73 29 20 2b 20 27 20 |cvtstr(p|ts) + ' |
|00001540| 70 6f 69 6e 74 73 2f 27 | 20 2b 0d 0a 20 20 20 5c |points/'| +.. \|
|00001550| 68 73 6b 69 70 33 65 6d | 20 63 76 74 73 74 72 28 |hskip3em| cvtstr(|
|00001560| 74 75 72 6e 73 29 20 2b | 20 27 20 6d 6f 76 65 73 |turns) +| ' moves|
|00001570| 27 29 3b 0d 0a 5c 72 62 | 0d 0a 7d 5c 6d 65 64 73 |');..\rb|..}\meds|
|00001580| 6b 69 70 5c 6e 6f 69 6e | 64 65 6e 74 0d 0a 59 6f |kip\noin|dent..Yo|
|00001590| 75 20 63 61 6e 20 64 6f | 20 65 78 61 63 74 6c 79 |u can do| exactly|
|000015a0| 20 74 68 65 20 73 61 6d | 65 20 74 68 69 6e 67 20 | the sam|e thing |
|000015b0| 77 69 74 68 20 6f 62 6a | 65 63 74 73 2e 20 20 54 |with obj|ects. T|
|000015c0| 68 65 20 66 6f 6c 6c 6f | 77 69 6e 67 0d 0a 65 78 |he follo|wing..ex|
|000015d0| 61 6d 70 6c 65 20 65 6e | 74 69 72 65 6c 79 20 72 |ample en|tirely r|
|000015e0| 65 70 6c 61 63 65 73 20 | 61 20 76 65 72 62 20 64 |eplaces |a verb d|
|000015f0| 65 66 69 6e 65 64 20 69 | 6e 20 7b 5c 74 74 20 61 |efined i|n {\tt a|
|00001600| 64 76 2e 74 7d 2e 0d 0a | 0d 0a 7b 5c 65 78 61 6d |dv.t}...|..{\exam|
|00001610| 70 6c 65 0d 0a 5c 23 69 | 6e 63 6c 75 64 65 20 3c |ple..\#i|nclude <|
|00001620| 61 64 76 2e 74 3e 0d 0a | 5c 76 73 6b 69 70 31 31 |adv.t>..|\vskip11|
|00001630| 70 74 0d 0a 20 20 20 20 | 20 20 20 2f 2a 20 77 65 |pt.. | /* we|
|00001640| 20 64 6f 6e 27 74 20 77 | 61 6e 74 20 27 62 75 63 | don't w|ant 'buc|
|00001650| 6b 6c 65 27 20 2d 2d 20 | 72 65 70 6c 61 63 65 20 |kle' -- |replace |
|00001660| 66 61 73 74 65 6e 56 65 | 72 62 20 2a 2f 0d 0a 5c |fastenVe|rb */..\|
|00001670| 6f 62 6a 65 63 74 7b 72 | 65 70 6c 61 63 65 20 66 |object{r|eplace f|
|00001680| 61 73 74 65 6e 56 65 72 | 62 3a 20 64 65 65 70 76 |astenVer|b: deepv|
|00001690| 65 72 62 7d 0d 0a 20 20 | 20 76 65 72 62 20 3d 20 |erb}.. | verb = |
|000016a0| 27 66 61 73 74 65 6e 27 | 0d 0a 20 20 20 73 64 65 |'fasten'|.. sde|
|000016b0| 73 63 20 3d 20 22 66 61 | 73 74 65 6e 22 0d 0a 20 |sc = "fa|sten".. |
|000016c0| 20 20 70 72 65 70 44 65 | 66 61 75 6c 74 20 3d 20 | prepDe|fault = |
|000016d0| 74 6f 50 72 65 70 0d 0a | 20 20 20 69 6f 41 63 74 |toPrep..| ioAct|
|000016e0| 69 6f 6e 28 74 6f 50 72 | 65 70 29 20 3d 20 27 46 |ion(toPr|ep) = 'F|
|000016f0| 61 73 74 65 6e 54 6f 27 | 0d 0a 5c 65 6e 64 6f 62 |astenTo'|..\endob|
|00001700| 6a 0d 0a 7d 5c 6d 65 64 | 73 6b 69 70 0d 0a 0d 0a |j..}\med|skip....|
|00001710| 52 65 70 6c 61 63 69 6e | 67 20 61 6e 20 6f 62 6a |Replacin|g an obj|
|00001720| 65 63 74 20 65 6e 74 69 | 72 65 6c 79 20 64 65 6c |ect enti|rely del|
|00001730| 65 74 65 73 20 74 68 65 | 20 70 72 65 76 69 6f 75 |etes the| previou|
|00001740| 73 20 64 65 66 69 6e 69 | 74 69 6f 6e 2c 20 69 6e |s defini|tion, in|
|00001750| 63 6c 75 64 69 6e 67 0d | 0a 61 6c 6c 20 69 6e 68 |cluding.|.all inh|
|00001760| 65 72 69 74 61 6e 63 65 | 20 69 6e 66 6f 72 6d 61 |eritance| informa|
|00001770| 74 69 6f 6e 20 61 6e 64 | 20 76 6f 63 61 62 75 6c |tion and| vocabul|
|00001780| 61 72 79 2e 20 20 54 68 | 65 20 6f 6e 6c 79 20 70 |ary. Th|e only p|
|00001790| 72 6f 70 65 72 74 69 65 | 73 20 6f 66 20 61 0d 0a |ropertie|s of a..|
|000017a0| 72 65 70 6c 61 63 65 64 | 20 6f 62 6a 65 63 74 20 |replaced| object |
|000017b0| 61 72 65 20 74 68 6f 73 | 65 20 64 65 66 69 6e 65 |are thos|e define|
|000017c0| 64 20 69 6e 20 74 68 65 | 20 72 65 70 6c 61 63 65 |d in the| replace|
|000017d0| 6d 65 6e 74 3b 20 74 68 | 65 20 6f 72 69 67 69 6e |ment; th|e origin|
|000017e0| 61 6c 0d 0a 64 65 66 69 | 6e 69 74 69 6f 6e 20 69 |al..defi|nition i|
|000017f0| 73 20 65 6e 74 69 72 65 | 6c 79 20 64 69 73 63 61 |s entire|ly disca|
|00001800| 72 64 65 64 2e 0d 0a 0d | 0a 59 6f 75 20 63 61 6e |rded....|.You can|
|00001810| 20 61 6c 73 6f 20 6d 6f | 64 69 66 79 20 61 6e 20 | also mo|dify an |
|00001820| 6f 62 6a 65 63 74 2c 20 | 72 65 74 61 69 6e 69 6e |object, |retainin|
|00001830| 67 20 69 74 73 20 6f 72 | 69 67 69 6e 61 6c 20 64 |g its or|iginal d|
|00001840| 65 66 69 6e 69 74 69 6f | 6e 20 28 69 6e 63 6c 75 |efinitio|n (inclu|
|00001850| 64 69 6e 67 0d 0a 69 6e | 68 65 72 69 74 61 6e 63 |ding..in|heritanc|
|00001860| 65 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 2c 20 76 |e inform|ation, v|
|00001870| 6f 63 61 62 75 6c 61 72 | 79 2c 20 61 6e 64 20 70 |ocabular|y, and p|
|00001880| 72 6f 70 65 72 74 69 65 | 73 29 2e 20 20 54 68 69 |ropertie|s). Thi|
|00001890| 73 20 61 6c 6c 6f 77 73 | 20 79 6f 75 20 74 6f 0d |s allows| you to.|
|000018a0| 0a 61 64 64 20 6e 65 77 | 20 70 72 6f 70 65 72 74 |.add new| propert|
|000018b0| 69 65 73 20 61 6e 64 20 | 76 6f 63 61 62 75 6c 61 |ies and |vocabula|
|000018c0| 72 79 2e 20 20 59 6f 75 | 20 63 61 6e 20 61 6c 73 |ry. You| can als|
|000018d0| 6f 20 6f 76 65 72 72 69 | 64 65 20 70 72 6f 70 65 |o overri|de prope|
|000018e0| 72 74 69 65 73 2c 0d 0a | 73 69 6d 70 6c 79 20 62 |rties,..|simply b|
|000018f0| 79 20 72 65 64 65 66 69 | 6e 69 6e 67 20 74 68 65 |y redefi|ning the|
|00001900| 6d 20 69 6e 20 74 68 65 | 20 6e 65 77 20 64 65 66 |m in the| new def|
|00001910| 69 6e 69 74 69 6f 6e 2e | 0d 0a 0d 0a 54 68 65 20 |inition.|....The |
|00001920| 6d 6f 73 74 20 63 6f 6d | 6d 6f 6e 20 61 64 64 69 |most com|mon addi|
|00001930| 74 69 6f 6e 20 74 6f 20 | 61 6e 20 6f 62 6a 65 63 |tion to |an objec|
|00001940| 74 20 66 72 6f 6d 20 7b | 5c 74 74 20 61 64 76 2e |t from {|\tt adv.|
|00001950| 74 7d 20 77 69 6c 6c 20 | 70 72 6f 62 61 62 6c 79 |t} will |probably|
|00001960| 20 62 65 0d 0a 6e 65 77 | 20 76 65 72 62 20 61 73 | be..new| verb as|
|00001970| 73 6f 63 69 61 74 69 6f | 6e 73 20 61 6e 64 20 61 |sociatio|ns and a|
|00001980| 64 64 65 64 20 76 6f 63 | 61 62 75 6c 61 72 79 2e |dded voc|abulary.|
|00001990| 0d 0a 0d 0a 7b 5c 65 78 | 61 6d 70 6c 65 0d 0a 5c |....{\ex|ample..\|
|000019a0| 6f 62 6a 65 63 74 7b 6d | 6f 64 69 66 79 20 70 75 |object{m|odify pu|
|000019b0| 73 68 56 65 72 62 7d 0d | 0a 20 20 20 76 65 72 62 |shVerb}.|. verb|
|000019c0| 20 3d 20 27 6e 75 64 67 | 65 27 0d 0a 20 20 20 69 | = 'nudg|e'.. i|
|000019d0| 6f 41 63 74 69 6f 6e 28 | 77 69 74 68 50 72 65 70 |oAction(|withPrep|
|000019e0| 29 20 3d 20 27 50 75 73 | 68 57 69 74 68 27 0d 0a |) = 'Pus|hWith'..|
|000019f0| 5c 65 6e 64 6f 62 6a 0d | 0a 7d 5c 6d 65 64 73 6b |\endobj.|.}\medsk|
|00001a00| 69 70 0d 0a 0d 0a 4e 6f | 74 65 20 73 65 76 65 72 |ip....No|te sever|
|00001a10| 61 6c 20 74 68 69 6e 67 | 73 20 61 62 6f 75 74 20 |al thing|s about |
|00001a20| 74 68 69 73 20 65 78 61 | 6d 70 6c 65 2e 20 20 46 |this exa|mple. F|
|00001a30| 69 72 73 74 2c 20 6e 6f | 20 73 75 70 65 72 63 6c |irst, no| supercl|
|00001a40| 61 73 73 0d 0a 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |ass..inf|ormation|
|00001a50| 20 63 61 6e 20 62 65 20 | 73 70 65 63 69 66 69 65 | can be |specifie|
|00001a60| 64 20 69 6e 20 61 20 7b | 5c 74 74 20 6d 6f 64 69 |d in a {|\tt modi|
|00001a70| 66 79 7d 20 73 74 61 74 | 65 6d 65 6e 74 3b 20 74 |fy} stat|ement; t|
|00001a80| 68 69 73 20 69 73 20 62 | 65 63 61 75 73 65 0d 0a |his is b|ecause..|
|00001a90| 74 68 65 20 73 75 70 65 | 72 63 6c 61 73 73 20 6c |the supe|rclass l|
|00001aa0| 69 73 74 20 66 6f 72 20 | 74 68 65 20 6d 6f 64 69 |ist for |the modi|
|00001ab0| 66 69 65 64 20 6f 62 6a | 65 63 74 20 69 73 20 74 |fied obj|ect is t|
|00001ac0| 68 65 20 73 61 6d 65 20 | 61 73 20 66 6f 72 20 74 |he same |as for t|
|00001ad0| 68 65 0d 0a 6f 72 69 67 | 69 6e 61 6c 20 6f 62 6a |he..orig|inal obj|
|00001ae0| 65 63 74 2e 20 20 53 65 | 63 6f 6e 64 2c 20 6e 6f |ect. Se|cond, no|
|00001af0| 74 65 20 74 68 61 74 20 | 76 6f 63 61 62 75 6c 61 |te that |vocabula|
|00001b00| 72 79 20 68 61 73 20 62 | 65 65 6e 20 61 64 64 65 |ry has b|een adde|
|00001b10| 64 2e 0d 0a 54 68 65 20 | 61 64 64 69 74 69 6f 6e |d...The |addition|
|00001b20| 61 6c 20 76 6f 63 61 62 | 75 6c 61 72 79 20 64 6f |al vocab|ulary do|
|00001b30| 65 73 20 7b 5c 69 74 20 | 6e 6f 74 7d 20 72 65 70 |es {\it |not} rep|
|00001b40| 6c 61 63 65 20 74 68 65 | 20 6f 72 69 67 69 6e 61 |lace the| origina|
|00001b50| 6c 20 76 6f 63 61 62 75 | 6c 61 72 79 2c 0d 0a 62 |l vocabu|lary,..b|
|00001b60| 75 74 20 73 69 6d 70 6c | 79 20 61 64 64 73 20 74 |ut simpl|y adds t|
|00001b70| 6f 20 74 68 65 20 70 72 | 65 76 69 6f 75 73 6c 79 |o the pr|eviously|
|00001b80| 2d 64 65 66 69 6e 65 64 | 20 76 6f 63 61 62 75 6c |-defined| vocabul|
|00001b90| 61 72 79 2e 20 20 46 75 | 72 74 68 65 72 20 6e 6f |ary. Fu|rther no|
|00001ba0| 74 65 0d 0a 74 68 61 74 | 20 76 65 72 62 20 61 73 |te..that| verb as|
|00001bb0| 73 6f 63 69 61 74 69 6f | 6e 20 70 73 65 75 64 6f |sociatio|n pseudo|
|00001bc0| 2d 70 72 6f 70 65 72 74 | 69 65 73 2c 20 73 75 63 |-propert|ies, suc|
|00001bd0| 68 20 61 73 20 7b 5c 74 | 74 20 64 6f 41 63 74 69 |h as {\t|t doActi|
|00001be0| 6f 6e 7d 0d 0a 61 6e 64 | 20 7b 5c 74 74 20 69 6f |on}..and| {\tt io|
|00001bf0| 41 63 74 69 6f 6e 7d 2c | 20 61 72 65 20 6c 65 67 |Action},| are leg|
|00001c00| 61 6c 20 69 6e 20 61 20 | 7b 5c 74 74 20 6d 6f 64 |al in a |{\tt mod|
|00001c10| 69 66 79 7d 20 64 65 66 | 69 6e 69 74 69 6f 6e 2e |ify} def|inition.|
|00001c20| 0d 0a 0d 0a 49 6e 20 61 | 20 6d 65 74 68 6f 64 20 |....In a| method |
|00001c30| 74 68 61 74 20 79 6f 75 | 20 72 65 64 65 66 69 6e |that you| redefin|
|00001c40| 65 20 77 69 74 68 20 7b | 5c 74 74 20 6d 6f 64 69 |e with {|\tt modi|
|00001c50| 66 79 7d 2c 20 79 6f 75 | 20 63 61 6e 20 75 73 65 |fy}, you| can use|
|00001c60| 20 7b 5c 74 74 20 70 61 | 73 73 7d 0d 0a 61 6e 64 | {\tt pa|ss}..and|
|00001c70| 20 7b 5c 74 74 20 69 6e | 68 65 72 69 74 65 64 7d | {\tt in|herited}|
|00001c80| 20 74 6f 20 72 65 66 65 | 72 20 74 6f 20 74 68 65 | to refe|r to the|
|00001c90| 20 7b 5c 69 74 20 72 65 | 70 6c 61 63 65 64 7d 20 | {\it re|placed} |
|00001ca0| 6d 65 74 68 6f 64 20 69 | 6e 20 74 68 65 20 6f 72 |method i|n the or|
|00001cb0| 69 67 69 6e 61 6c 0d 0a | 64 65 66 69 6e 69 74 69 |iginal..|definiti|
|00001cc0| 6f 6e 20 6f 66 20 74 68 | 65 20 6f 62 6a 65 63 74 |on of th|e object|
|00001cd0| 2e 20 20 49 6e 20 65 73 | 73 65 6e 63 65 2c 20 75 |. In es|sence, u|
|00001ce0| 73 69 6e 67 20 7b 5c 74 | 74 20 6d 6f 64 69 66 79 |sing {\t|t modify|
|00001cf0| 7d 20 72 65 6e 61 6d 65 | 73 0d 0a 74 68 65 20 6f |} rename|s..the o|
|00001d00| 72 69 67 69 6e 61 6c 20 | 6f 62 6a 65 63 74 2c 20 |riginal |object, |
|00001d10| 61 6e 64 20 74 68 65 6e | 20 63 72 65 61 74 65 73 |and then| creates|
|00001d20| 20 61 20 6e 65 77 20 6f | 62 6a 65 63 74 20 75 6e | a new o|bject un|
|00001d30| 64 65 72 20 74 68 65 20 | 6f 72 69 67 69 6e 61 6c |der the |original|
|00001d40| 0d 0a 6e 61 6d 65 3b 20 | 74 68 65 20 6e 65 77 20 |..name; |the new |
|00001d50| 6f 62 6a 65 63 74 20 69 | 73 20 63 72 65 61 74 65 |object i|s create|
|00001d60| 64 20 61 73 20 61 20 73 | 75 62 63 6c 61 73 73 20 |d as a s|ubclass |
|00001d70| 6f 66 20 74 68 65 20 6f | 72 69 67 69 6e 61 6c 20 |of the o|riginal |
|00001d80| 28 6e 6f 77 0d 0a 75 6e | 6e 61 6d 65 64 29 20 6f |(now..un|named) o|
|00001d90| 62 6a 65 63 74 2e 20 20 | 28 54 68 65 72 65 20 69 |bject. |(There i|
|00001da0| 73 20 6e 6f 20 77 61 79 | 20 74 6f 20 72 65 66 65 |s no way| to refe|
|00001db0| 72 20 74 6f 20 74 68 65 | 20 6f 72 69 67 69 6e 61 |r to the| origina|
|00001dc0| 6c 20 6f 62 6a 65 63 74 | 0d 0a 64 69 72 65 63 74 |l object|..direct|
|00001dd0| 6c 79 3b 20 79 6f 75 20 | 63 61 6e 20 6f 6e 6c 79 |ly; you |can only|
|00001de0| 20 72 65 66 65 72 20 74 | 6f 20 69 74 20 69 6e 64 | refer t|o it ind|
|00001df0| 69 72 65 63 74 6c 79 20 | 74 68 72 6f 75 67 68 20 |irectly |through |
|00001e00| 74 68 65 20 6e 65 77 20 | 72 65 70 6c 61 63 65 6d |the new |replacem|
|00001e10| 65 6e 74 0d 0a 6f 62 6a | 65 63 74 2e 29 20 20 48 |ent..obj|ect.) H|
|00001e20| 65 72 65 27 73 20 61 6e | 20 65 78 61 6d 70 6c 65 |ere's an| example|
|00001e30| 20 6f 66 20 75 73 69 6e | 67 20 7b 5c 74 74 20 70 | of usin|g {\tt p|
|00001e40| 61 73 73 7d 20 77 69 74 | 68 20 7b 5c 74 74 20 6d |ass} wit|h {\tt m|
|00001e50| 6f 64 69 66 79 7d 2e 0d | 0a 0d 0a 7b 5c 65 78 61 |odify}..|...{\exa|
|00001e60| 6d 70 6c 65 0d 0a 5c 6f | 62 6a 65 63 74 7b 63 6c |mple..\o|bject{cl|
|00001e70| 61 73 73 20 74 65 73 74 | 43 6c 61 73 73 3a 20 6f |ass test|Class: o|
|00001e80| 62 6a 65 63 74 7d 0d 0a | 20 20 20 20 73 64 65 73 |bject}..| sdes|
|00001e90| 63 20 3d 20 22 74 65 73 | 74 43 6c 61 73 73 22 0d |c = "tes|tClass".|
|00001ea0| 0a 5c 65 6e 64 6f 62 6a | 0d 0a 0d 0a 5c 6f 62 6a |.\endobj|....\obj|
|00001eb0| 65 63 74 7b 74 65 73 74 | 4f 62 6a 3a 20 74 65 73 |ect{test|Obj: tes|
|00001ec0| 74 43 6c 61 73 73 7d 0d | 0a 20 20 20 20 73 64 65 |tClass}.|. sde|
|00001ed0| 73 63 20 3d 0d 0a 20 20 | 20 20 5c 6c 62 0d 0a 20 |sc =.. | \lb.. |
|00001ee0| 20 20 20 20 20 20 20 22 | 74 65 73 74 4f 62 6a 2e | "|testObj.|
|00001ef0| 2e 2e 22 3b 0d 0a 09 70 | 61 73 73 20 73 64 65 73 |..";...p|ass sdes|
|00001f00| 63 3b 0d 0a 20 20 20 20 | 5c 72 62 0d 0a 5c 65 6e |c;.. |\rb..\en|
|00001f10| 64 6f 62 6a 0d 0a 0d 0a | 5c 6f 62 6a 65 63 74 7b |dobj....|\object{|
|00001f20| 6d 6f 64 69 66 79 20 74 | 65 73 74 4f 62 6a 7d 0d |modify t|estObj}.|
|00001f30| 0a 20 20 20 20 73 64 65 | 73 63 20 3d 0d 0a 20 20 |. sde|sc =.. |
|00001f40| 20 20 5c 6c 62 0d 0a 20 | 20 20 20 20 20 20 20 22 | \lb.. | "|
|00001f50| 6d 6f 64 69 66 69 65 64 | 20 74 65 73 74 4f 62 6a |modified| testObj|
|00001f60| 2e 2e 2e 22 3b 0d 0a 09 | 70 61 73 73 20 73 64 65 |...";...|pass sde|
|00001f70| 73 63 3b 0d 0a 20 20 20 | 20 5c 72 62 0d 0a 5c 65 |sc;.. | \rb..\e|
|00001f80| 6e 64 6f 62 6a 0d 0a 7d | 5c 6d 65 64 73 6b 69 70 |ndobj..}|\medskip|
|00001f90| 5c 6e 6f 69 6e 64 65 6e | 74 0d 0a 45 76 61 6c 75 |\noinden|t..Evalu|
|00001fa0| 61 74 69 6e 67 20 7b 5c | 74 74 20 74 65 73 74 4f |ating {\|tt testO|
|00001fb0| 62 6a 2e 73 64 65 73 63 | 7d 20 72 65 73 75 6c 74 |bj.sdesc|} result|
|00001fc0| 73 20 69 6e 20 74 68 69 | 73 20 64 69 73 70 6c 61 |s in thi|s displa|
|00001fd0| 79 3a 0d 0a 0d 0a 7b 5c | 65 78 61 6d 70 6c 65 0d |y:....{\|example.|
|00001fe0| 0a 6d 6f 64 69 66 69 65 | 64 20 74 65 73 74 4f 62 |.modifie|d testOb|
|00001ff0| 6a 2e 2e 2e 74 65 73 74 | 4f 62 6a 2e 2e 2e 74 65 |j...test|Obj...te|
|00002000| 73 74 43 6c 61 73 73 0d | 0a 7d 5c 6d 65 64 73 6b |stClass.|.}\medsk|
|00002010| 69 70 0d 0a 0d 0a 59 6f | 75 20 63 61 6e 20 61 6c |ip....Yo|u can al|
|00002020| 73 6f 20 72 65 70 6c 61 | 63 65 20 61 20 70 72 6f |so repla|ce a pro|
|00002030| 70 65 72 74 79 20 65 6e | 74 69 72 65 6c 79 2c 20 |perty en|tirely, |
|00002040| 65 72 61 73 69 6e 67 20 | 61 6c 6c 20 74 72 61 63 |erasing |all trac|
|00002050| 65 73 20 6f 66 20 74 68 | 65 0d 0a 6f 72 69 67 69 |es of th|e..origi|
|00002060| 6e 61 6c 20 64 65 66 69 | 6e 69 74 69 6f 6e 20 6f |nal defi|nition o|
|00002070| 66 20 61 20 70 72 6f 70 | 65 72 74 79 2e 20 20 54 |f a prop|erty. T|
|00002080| 68 65 20 6f 72 69 67 69 | 6e 61 6c 20 64 65 66 69 |he origi|nal defi|
|00002090| 6e 69 74 69 6f 6e 20 69 | 73 20 65 6e 74 69 72 65 |nition i|s entire|
|000020a0| 6c 79 0d 0a 66 6f 72 67 | 6f 74 74 65 6e 2d 2d 2d |ly..forg|otten---|
|000020b0| 75 73 69 6e 67 20 7b 5c | 74 74 20 70 61 73 73 7d |using {\|tt pass}|
|000020c0| 20 6f 72 20 7b 5c 74 74 | 20 69 6e 68 65 72 69 74 | or {\tt| inherit|
|000020d0| 65 64 7d 20 77 69 6c 6c | 20 72 65 66 65 72 20 74 |ed} will| refer t|
|000020e0| 6f 20 74 68 65 20 6d 65 | 74 68 6f 64 0d 0a 69 6e |o the me|thod..in|
|000020f0| 68 65 72 69 74 65 64 20 | 62 79 20 74 68 65 20 6f |herited |by the o|
|00002100| 72 69 67 69 6e 61 6c 20 | 6f 62 6a 65 63 74 2e 20 |riginal |object. |
|00002110| 20 54 6f 20 64 6f 20 74 | 68 69 73 2c 20 75 73 65 | To do t|his, use|
|00002120| 20 74 68 65 20 7b 5c 74 | 74 20 72 65 70 6c 61 63 | the {\t|t replac|
|00002130| 65 7d 0d 0a 6b 65 79 77 | 6f 72 64 20 77 69 74 68 |e}..keyw|ord with|
|00002140| 20 74 68 65 20 70 72 6f | 70 65 72 74 79 20 69 74 | the pro|perty it|
|00002150| 73 65 6c 66 2e 20 20 49 | 6e 20 74 68 65 20 65 78 |self. I|n the ex|
|00002160| 61 6d 70 6c 65 20 61 62 | 6f 76 65 2c 20 77 65 20 |ample ab|ove, we |
|00002170| 63 6f 75 6c 64 20 64 6f | 0d 0a 74 68 69 73 20 69 |could do|..this i|
|00002180| 6e 73 74 65 61 64 3a 0d | 0a 5c 76 66 69 6c 6c 5c |nstead:.|.\vfill\|
|00002190| 65 6a 65 63 74 0d 0a 7b | 5c 65 78 61 6d 70 6c 65 |eject..{|\example|
|000021a0| 0d 0a 5c 6f 62 6a 65 63 | 74 7b 6d 6f 64 69 66 79 |..\objec|t{modify|
|000021b0| 20 74 65 73 74 4f 62 6a | 7d 0d 0a 20 20 20 72 65 | testObj|}.. re|
|000021c0| 70 6c 61 63 65 20 73 64 | 65 73 63 20 3d 0d 0a 20 |place sd|esc =.. |
|000021d0| 20 20 5c 6c 62 0d 0a 20 | 20 20 20 20 20 20 22 6d | \lb.. | "m|
|000021e0| 6f 64 69 66 69 65 64 20 | 74 65 73 74 4f 62 6a 2e |odified |testObj.|
|000021f0| 2e 2e 22 3b 0d 0a 20 20 | 20 20 20 20 20 70 61 73 |..";.. | pas|
|00002200| 73 20 73 64 65 73 63 3b | 0d 0a 20 20 20 5c 72 62 |s sdesc;|.. \rb|
|00002210| 0d 0a 5c 65 6e 64 6f 62 | 6a 0d 0a 7d 5c 6d 65 64 |..\endob|j..}\med|
|00002220| 73 6b 69 70 5c 6e 6f 69 | 6e 64 65 6e 74 0d 0a 54 |skip\noi|ndent..T|
|00002230| 68 69 73 20 77 6f 75 6c | 64 20 72 65 73 75 6c 74 |his woul|d result|
|00002240| 20 69 6e 20 61 20 64 69 | 66 66 65 72 65 6e 74 20 | in a di|fferent |
|00002250| 64 69 73 70 6c 61 79 20 | 66 6f 72 20 7b 5c 74 74 |display |for {\tt|
|00002260| 20 74 65 73 74 4f 62 6a | 2e 73 64 65 73 63 7d 3a | testObj|.sdesc}:|
|00002270| 0d 0a 0d 0a 7b 5c 65 78 | 61 6d 70 6c 65 0d 0a 6d |....{\ex|ample..m|
|00002280| 6f 64 69 66 69 65 64 20 | 74 65 73 74 4f 62 6a 2e |odified |testObj.|
|00002290| 2e 2e 74 65 73 74 43 6c | 61 73 73 0d 0a 7d 5c 6d |..testCl|ass..}\m|
|000022a0| 65 64 73 6b 69 70 5c 6e | 6f 69 6e 64 65 6e 74 0d |edskip\n|oindent.|
|000022b0| 0a 54 68 65 20 7b 5c 74 | 74 20 72 65 70 6c 61 63 |.The {\t|t replac|
|000022c0| 65 7d 20 6b 65 79 77 6f | 72 64 20 62 65 66 6f 72 |e} keywo|rd befor|
|000022d0| 65 20 74 68 65 20 70 72 | 6f 70 65 72 74 79 20 64 |e the pr|operty d|
|000022e0| 65 66 69 6e 69 74 69 6f | 6e 20 74 65 6c 6c 73 20 |efinitio|n tells |
|000022f0| 74 68 65 0d 0a 63 6f 6d | 70 69 6c 65 72 20 74 6f |the..com|piler to|
|00002300| 20 63 6f 6d 70 6c 65 74 | 65 6c 79 20 64 65 6c 65 | complet|ely dele|
|00002310| 74 65 20 74 68 65 20 70 | 72 65 76 69 6f 75 73 20 |te the p|revious |
|00002320| 64 65 66 69 6e 69 74 69 | 6f 6e 73 20 6f 66 20 74 |definiti|ons of t|
|00002330| 68 65 0d 0a 70 72 6f 70 | 65 72 74 79 2e 20 20 54 |he..prop|erty. T|
|00002340| 68 69 73 20 61 6c 6c 6f | 77 73 20 79 6f 75 20 74 |his allo|ws you t|
|00002350| 6f 20 63 6f 6d 70 6c 65 | 74 65 6c 79 20 72 65 70 |o comple|tely rep|
|00002360| 6c 61 63 65 20 74 68 65 | 20 70 72 6f 70 65 72 74 |lace the| propert|
|00002370| 79 2c 0d 0a 61 6e 64 20 | 6e 6f 74 20 6d 65 72 65 |y,..and |not mere|
|00002380| 6c 79 20 6f 76 65 72 72 | 69 64 65 20 69 74 2c 20 |ly overr|ide it, |
|00002390| 6d 65 61 6e 69 6e 67 20 | 74 68 61 74 20 7b 5c 74 |meaning |that {\t|
|000023a0| 74 20 70 61 73 73 7d 20 | 61 6e 64 20 7b 5c 74 74 |t pass} |and {\tt|
|000023b0| 20 69 6e 68 65 72 69 74 | 65 64 7d 0d 0a 77 69 6c | inherit|ed}..wil|
|000023c0| 6c 20 72 65 66 65 72 20 | 74 6f 20 74 68 65 20 70 |l refer |to the p|
|000023d0| 72 6f 70 65 72 74 79 20 | 61 63 74 75 61 6c 6c 79 |roperty |actually|
|000023e0| 20 69 6e 68 65 72 69 74 | 65 64 20 66 72 6f 6d 20 | inherit|ed from |
|000023f0| 74 68 65 20 73 75 70 65 | 72 63 6c 61 73 73 2c 0d |the supe|rclass,.|
|00002400| 0a 61 6e 64 20 6e 6f 74 | 20 74 68 65 20 6f 72 69 |.and not| the ori|
|00002410| 67 69 6e 61 6c 20 64 65 | 66 69 6e 69 74 69 6f 6e |ginal de|finition|
|00002420| 20 6f 66 20 74 68 65 20 | 70 72 6f 70 65 72 74 79 | of the |property|
|00002430| 2e 0d 0a 0d 0a 5c 74 6f | 70 69 63 20 7b 5c 74 74 |.....\to|pic {\tt|
|00002440| 20 76 61 6c 69 64 44 6f | 4c 69 73 74 7d 20 61 6e | validDo|List} an|
|00002450| 64 20 7b 5c 74 74 20 76 | 61 6c 69 64 49 6f 4c 69 |d {\tt v|alidIoLi|
|00002460| 73 74 7d 0d 0a 0d 0a 53 | 6f 6d 65 20 67 61 6d 65 |st}....S|ome game|
|00002470| 20 61 75 74 68 6f 72 73 | 20 65 6e 63 6f 75 6e 74 | authors| encount|
|00002480| 65 72 65 64 20 61 20 70 | 65 72 66 6f 72 6d 61 6e |ered a p|erforman|
|00002490| 63 65 20 70 72 6f 62 6c | 65 6d 20 77 68 65 6e 20 |ce probl|em when |
|000024a0| 64 65 66 69 6e 69 6e 67 | 0d 0a 61 20 6c 61 72 67 |defining|..a larg|
|000024b0| 65 20 6e 75 6d 62 65 72 | 20 6f 66 20 6f 62 6a 65 |e number| of obje|
|000024c0| 63 74 73 20 77 69 74 68 | 20 74 68 65 20 73 61 6d |cts with| the sam|
|000024d0| 65 20 76 6f 63 61 62 75 | 6c 61 72 79 2e 20 20 46 |e vocabu|lary. F|
|000024e0| 6f 72 20 65 78 61 6d 70 | 6c 65 2c 0d 0a 69 66 20 |or examp|le,..if |
|000024f0| 61 20 67 61 6d 65 20 68 | 61 64 20 74 68 69 72 74 |a game h|ad thirt|
|00002500| 79 20 6f 72 20 66 6f 72 | 74 79 20 6f 62 6a 65 63 |y or for|ty objec|
|00002510| 74 73 20 74 68 61 74 20 | 61 6c 6c 20 68 61 64 20 |ts that |all had |
|00002520| 74 68 65 20 6e 6f 75 6e | 0d 0a 7b 5c 74 74 20 27 |the noun|..{\tt '|
|00002530| 62 75 74 74 6f 6e 27 7d | 2c 20 74 68 65 20 73 79 |button'}|, the sy|
|00002540| 73 74 65 6d 20 74 6f 6f | 6b 20 61 20 6c 6f 6e 67 |stem too|k a long|
|00002550| 20 74 69 6d 65 20 74 6f | 20 64 69 73 61 6d 62 69 | time to| disambi|
|00002560| 67 75 61 74 65 20 61 0d | 0a 63 6f 6d 6d 61 6e 64 |guate a.|.command|
|00002570| 20 73 75 63 68 20 61 73 | 20 60 60 70 75 73 68 20 | such as| ``push |
|00002580| 62 75 74 74 6f 6e 27 27 | 20 65 76 65 6e 20 77 68 |button''| even wh|
|00002590| 65 6e 20 6f 6e 6c 79 20 | 6f 6e 65 20 62 75 74 74 |en only |one butt|
|000025a0| 6f 6e 20 77 61 73 0d 0a | 70 72 65 73 65 6e 74 2e |on was..|present.|
|000025b0| 20 20 54 68 65 20 72 65 | 61 73 6f 6e 20 66 6f 72 | The re|ason for|
|000025c0| 20 74 68 65 20 64 65 6c | 61 79 20 69 73 20 74 68 | the del|ay is th|
|000025d0| 61 74 20 74 68 65 20 72 | 75 6e 2d 74 69 6d 65 20 |at the r|un-time |
|000025e0| 6e 65 65 64 65 64 20 74 | 6f 0d 0a 72 75 6e 20 65 |needed t|o..run e|
|000025f0| 61 63 68 20 6f 62 6a 65 | 63 74 20 74 68 61 74 20 |ach obje|ct that |
|00002600| 6d 61 74 63 68 65 64 20 | 74 68 65 20 76 6f 63 61 |matched |the voca|
|00002610| 62 75 6c 61 72 79 20 74 | 68 72 6f 75 67 68 20 74 |bulary t|hrough t|
|00002620| 68 65 20 7b 5c 74 74 20 | 76 61 6c 69 64 44 6f 7d |he {\tt |validDo}|
|00002630| 0d 0a 6f 72 20 7b 5c 74 | 74 20 76 61 6c 69 64 49 |..or {\t|t validI|
|00002640| 6f 7d 20 6d 65 74 68 6f | 64 20 28 61 73 20 61 70 |o} metho|d (as ap|
|00002650| 70 72 6f 70 72 69 61 74 | 65 29 20 66 6f 72 20 74 |propriat|e) for t|
|00002660| 68 65 20 76 65 72 62 3b | 20 77 68 65 6e 20 66 6f |he verb;| when fo|
|00002670| 72 74 79 0d 0a 6f 62 6a | 65 63 74 73 20 61 6c 6c |rty..obj|ects all|
|00002680| 20 68 61 64 20 74 68 65 | 20 73 61 6d 65 20 76 6f | had the| same vo|
|00002690| 63 61 62 75 6c 61 72 79 | 2c 20 74 68 65 20 70 61 |cabulary|, the pa|
|000026a0| 72 73 65 72 20 68 61 64 | 20 74 6f 20 63 61 6c 6c |rser had| to call|
|000026b0| 0d 0a 7b 5c 74 74 20 76 | 61 6c 69 64 44 6f 7d 20 |..{\tt v|alidDo} |
|000026c0| 66 6f 72 74 79 20 74 69 | 6d 65 73 2c 20 72 65 73 |forty ti|mes, res|
|000026d0| 75 6c 74 69 6e 67 20 69 | 6e 20 6c 65 6e 67 74 68 |ulting i|n length|
|000026e0| 79 20 70 61 72 73 69 6e | 67 20 64 65 6c 61 79 73 |y parsin|g delays|
|000026f0| 2e 0d 0a 0d 0a 54 6f 20 | 69 6d 70 72 6f 76 65 20 |.....To |improve |
|00002700| 72 75 6e 2d 74 69 6d 65 | 20 70 65 72 66 6f 72 6d |run-time| perform|
|00002710| 61 6e 63 65 20 69 6e 20 | 74 68 65 73 65 20 73 69 |ance in |these si|
|00002720| 74 75 61 74 69 6f 6e 73 | 2c 20 74 68 65 20 70 61 |tuations|, the pa|
|00002730| 72 73 65 72 20 6e 6f 77 | 0d 0a 63 61 6c 6c 73 20 |rser now|..calls |
|00002740| 61 20 6d 65 74 68 6f 64 | 20 69 6e 20 74 68 65 20 |a method| in the |
|00002750| 76 65 72 62 20 6f 62 6a | 65 63 74 20 74 6f 20 72 |verb obj|ect to r|
|00002760| 65 64 75 63 65 20 74 68 | 65 20 6e 75 6d 62 65 72 |educe th|e number|
|00002770| 20 6f 66 20 6f 62 6a 65 | 63 74 73 0d 0a 74 68 61 | of obje|cts..tha|
|00002780| 74 20 6d 75 73 74 20 62 | 65 20 63 6f 6e 73 69 64 |t must b|e consid|
|00002790| 65 72 65 64 2e 20 20 54 | 68 65 20 6e 65 77 20 6d |ered. T|he new m|
|000027a0| 65 74 68 6f 64 20 69 73 | 20 7b 5c 74 74 20 76 61 |ethod is| {\tt va|
|000027b0| 6c 69 64 44 6f 4c 69 73 | 74 7d 20 66 6f 72 0d 0a |lidDoLis|t} for..|
|000027c0| 64 69 72 65 63 74 20 6f | 62 6a 65 63 74 73 2c 20 |direct o|bjects, |
|000027d0| 61 6e 64 20 7b 5c 74 74 | 20 76 61 6c 69 64 49 6f |and {\tt| validIo|
|000027e0| 4c 69 73 74 7d 20 66 6f | 72 20 69 6e 64 69 72 65 |List} fo|r indire|
|000027f0| 63 74 20 6f 62 6a 65 63 | 74 73 2e 20 20 54 68 69 |ct objec|ts. Thi|
|00002800| 73 0d 0a 6d 65 74 68 6f | 64 20 72 65 74 75 72 6e |s..metho|d return|
|00002810| 73 20 61 20 6c 69 73 74 | 20 6f 66 20 61 6c 6c 20 |s a list| of all |
|00002820| 6f 66 20 74 68 65 20 6f | 62 6a 65 63 74 73 20 66 |of the o|bjects f|
|00002830| 6f 72 20 77 68 69 63 68 | 20 7b 5c 74 74 20 76 61 |or which| {\tt va|
|00002840| 6c 69 64 44 6f 7d 0d 0a | 6f 72 20 7b 5c 74 74 20 |lidDo}..|or {\tt |
|00002850| 76 61 6c 69 64 49 6f 7d | 20 28 72 65 73 70 65 63 |validIo}| (respec|
|00002860| 74 69 76 65 6c 79 29 20 | 77 6f 75 6c 64 20 72 65 |tively) |would re|
|00002870| 74 75 72 6e 20 7b 5c 74 | 74 20 74 72 75 65 7d 2e |turn {\t|t true}.|
|00002880| 20 20 54 68 65 20 70 61 | 72 73 65 72 0d 0a 6c 69 | The pa|rser..li|
|00002890| 6d 69 74 73 20 69 74 73 | 20 63 68 65 63 6b 73 20 |mits its| checks |
|000028a0| 74 6f 20 74 68 65 20 6f | 62 6a 65 63 74 73 20 72 |to the o|bjects r|
|000028b0| 65 74 75 72 6e 65 64 20 | 62 79 20 74 68 69 73 20 |eturned |by this |
|000028c0| 6e 65 77 20 6d 65 74 68 | 6f 64 3b 20 74 68 65 0d |new meth|od; the.|
|000028d0| 0a 72 65 73 75 6c 74 20 | 69 73 20 74 68 61 74 20 |.result |is that |
|000028e0| 6f 6e 6c 79 20 61 20 66 | 65 77 20 6f 62 6a 65 63 |only a f|ew objec|
|000028f0| 74 73 20 74 79 70 69 63 | 61 6c 6c 79 20 6e 65 65 |ts typic|ally nee|
|00002900| 64 20 74 6f 20 62 65 20 | 63 68 65 63 6b 65 64 0d |d to be |checked.|
|00002910| 0a 77 69 74 68 20 7b 5c | 74 74 20 76 61 6c 69 64 |.with {\|tt valid|
|00002920| 44 6f 7d 20 6f 72 20 7b | 5c 74 74 20 76 61 6c 69 |Do} or {|\tt vali|
|00002930| 64 49 6f 7d 2c 20 65 6c | 69 6d 69 6e 61 74 69 6e |dIo}, el|iminatin|
|00002940| 67 20 74 68 65 20 6c 65 | 6e 67 74 68 79 20 70 61 |g the le|ngthy pa|
|00002950| 72 73 69 6e 67 0d 0a 64 | 65 6c 61 79 73 20 66 6f |rsing..d|elays fo|
|00002960| 72 20 6f 62 6a 65 63 74 | 73 20 77 69 74 68 20 63 |r object|s with c|
|00002970| 6f 6d 6d 6f 6e 20 6e 61 | 6d 65 73 2e 0d 0a 0d 0a |ommon na|mes.....|
|00002980| 54 68 65 20 6f 62 6a 65 | 63 74 73 20 72 65 74 75 |The obje|cts retu|
|00002990| 72 6e 65 64 20 62 79 20 | 7b 5c 74 74 20 76 61 6c |rned by |{\tt val|
|000029a0| 69 64 44 6f 4c 69 73 74 | 7d 20 61 6e 64 20 7b 5c |idDoList|} and {\|
|000029b0| 74 74 20 76 61 6c 69 64 | 49 6f 4c 69 73 74 7d 0d |tt valid|IoList}.|
|000029c0| 0a 61 72 65 20 6d 61 74 | 63 68 65 64 20 61 67 61 |.are mat|ched aga|
|000029d0| 69 6e 73 74 20 74 68 65 | 20 76 6f 63 61 62 75 6c |inst the| vocabul|
|000029e0| 61 72 79 20 77 6f 72 64 | 73 20 75 73 65 64 20 62 |ary word|s used b|
|000029f0| 79 20 74 68 65 20 70 6c | 61 79 65 72 2c 20 74 68 |y the pl|ayer, th|
|00002a00| 65 6e 0d 0a 74 65 73 74 | 65 64 20 74 68 72 6f 75 |en..test|ed throu|
|00002a10| 67 68 20 7b 5c 74 74 20 | 76 61 6c 69 64 44 6f 7d |gh {\tt |validDo}|
|00002a20| 20 6f 72 20 7b 5c 74 74 | 20 76 61 6c 69 64 49 6f | or {\tt| validIo|
|00002a30| 7d 20 61 73 20 61 6c 77 | 61 79 73 2e 20 20 4e 6f |} as alw|ays. No|
|00002a40| 74 65 20 74 68 61 74 0d | 0a 74 68 69 73 20 6d 65 |te that.|.this me|
|00002a50| 61 6e 73 20 74 68 61 74 | 20 7b 5c 74 74 20 76 61 |ans that| {\tt va|
|00002a60| 6c 69 64 44 6f 4c 69 73 | 74 7d 20 61 6e 64 20 7b |lidDoLis|t} and {|
|00002a70| 5c 74 74 20 76 61 6c 69 | 64 49 6f 4c 69 73 74 7d |\tt vali|dIoList}|
|00002a80| 20 63 61 6e 20 73 61 66 | 65 6c 79 0d 0a 72 65 74 | can saf|ely..ret|
|00002a90| 75 72 6e 20 7b 5c 69 74 | 20 74 6f 6f 20 6d 61 6e |urn {\it| too man|
|00002aa0| 79 5c 2f 7d 20 6f 62 6a | 65 63 74 73 2d 2d 2d 74 |y\/} obj|ects---t|
|00002ab0| 68 61 74 20 69 73 2c 20 | 74 68 65 79 20 63 61 6e |hat is, |they can|
|00002ac0| 20 72 65 74 75 72 6e 20 | 6f 62 6a 65 63 74 73 0d | return |objects.|
|00002ad0| 0a 74 68 61 74 20 77 6f | 75 6c 64 20 6e 6f 74 20 |.that wo|uld not |
|00002ae0| 61 63 74 75 61 6c 6c 79 | 20 70 61 73 73 20 7b 5c |actually| pass {\|
|00002af0| 74 74 20 76 61 6c 69 64 | 44 6f 7d 20 6f 72 20 7b |tt valid|Do} or {|
|00002b00| 5c 74 74 20 76 61 6c 69 | 64 49 6f 7d 20 77 69 74 |\tt vali|dIo} wit|
|00002b10| 68 6f 75 74 0d 0a 63 61 | 75 73 69 6e 67 20 61 6e |hout..ca|using an|
|00002b20| 79 20 70 72 6f 62 6c 65 | 6d 2e 20 20 54 68 69 73 |y proble|m. This|
|00002b30| 20 65 6c 69 6d 69 6e 61 | 74 65 73 20 74 68 65 20 | elimina|tes the |
|00002b40| 6e 65 65 64 20 74 6f 20 | 70 65 72 66 6f 72 6d 20 |need to |perform |
|00002b50| 74 69 6d 65 2d 63 6f 6e | 73 75 6d 69 6e 67 0d 0a |time-con|suming..|
|00002b60| 70 72 6f 63 65 73 73 69 | 6e 67 20 69 6e 20 74 68 |processi|ng in th|
|00002b70| 65 73 65 20 6e 65 77 20 | 72 6f 75 74 69 6e 65 73 |ese new |routines|
|00002b80| 2c 20 77 68 69 63 68 20 | 66 75 72 74 68 65 72 20 |, which |further |
|00002b90| 69 6d 70 72 6f 76 65 73 | 20 70 65 72 66 6f 72 6d |improves| perform|
|00002ba0| 61 6e 63 65 3b 0d 0a 74 | 68 65 20 6e 65 77 20 6c |ance;..t|he new l|
|00002bb0| 69 73 74 69 6e 67 20 6d | 65 74 68 6f 64 73 20 63 |isting m|ethods c|
|00002bc0| 61 6e 20 73 69 6d 70 6c | 79 20 72 65 74 75 72 6e |an simpl|y return|
|00002bd0| 20 74 68 65 20 6c 69 73 | 74 20 6f 66 20 65 76 65 | the lis|t of eve|
|00002be0| 72 79 74 68 69 6e 67 0d | 0a 74 68 61 74 27 73 20 |rything.|.that's |
|00002bf0| 65 76 65 6e 20 72 65 6d | 6f 74 65 6c 79 20 70 6f |even rem|otely po|
|00002c00| 73 73 69 62 6c 65 20 66 | 6f 72 20 74 68 65 20 63 |ssible f|or the c|
|00002c10| 6f 6d 6d 61 6e 64 2e 0d | 0a 0d 0a 54 68 65 20 6d |ommand..|...The m|
|00002c20| 65 74 68 6f 64 73 20 61 | 72 65 20 63 61 6c 6c 65 |ethods a|re calle|
|00002c30| 64 20 61 73 20 66 6f 6c | 6c 6f 77 73 3a 0d 0a 0d |d as fol|lows:...|
|00002c40| 0a 7b 5c 65 78 61 6d 70 | 6c 65 0d 0a 76 65 72 62 |.{\examp|le..verb|
|00002c50| 2e 76 61 6c 69 64 44 6f | 4c 69 73 74 28 61 63 74 |.validDo|List(act|
|00002c60| 6f 72 2c 20 70 72 65 70 | 2c 20 69 6f 62 6a 29 0d |or, prep|, iobj).|
|00002c70| 0a 76 65 72 62 2e 76 61 | 6c 69 64 49 6f 4c 69 73 |.verb.va|lidIoLis|
|00002c80| 74 28 61 63 74 6f 72 2c | 20 70 72 65 70 2c 20 64 |t(actor,| prep, d|
|00002c90| 6f 62 6a 29 0d 0a 7d 5c | 6d 65 64 73 6b 69 70 5c |obj)..}\|medskip\|
|00002ca0| 6e 6f 69 6e 64 65 6e 74 | 0d 0a 54 68 65 20 6e 65 |noindent|..The ne|
|00002cb0| 77 20 7b 5c 74 74 20 61 | 64 76 2e 74 7d 20 70 72 |w {\tt a|dv.t} pr|
|00002cc0| 6f 76 69 64 65 73 20 73 | 75 69 74 61 62 6c 65 20 |ovides s|uitable |
|00002cd0| 7b 5c 74 74 20 76 61 6c | 69 64 44 6f 4c 69 73 74 |{\tt val|idDoList|
|00002ce0| 7d 20 61 6e 64 20 7b 5c | 74 74 20 76 61 6c 69 64 |} and {\|tt valid|
|00002cf0| 49 6f 4c 69 73 74 7d 0d | 0a 6d 65 74 68 6f 64 73 |IoList}.|.methods|
|00002d00| 20 66 6f 72 20 74 68 65 | 20 76 65 72 62 73 20 69 | for the| verbs i|
|00002d10| 74 20 70 72 6f 76 69 64 | 65 73 2e 20 20 47 65 6e |t provid|es. Gen|
|00002d20| 65 72 61 6c 6c 79 2c 20 | 74 68 65 73 65 20 6d 65 |erally, |these me|
|00002d30| 74 68 6f 64 73 20 72 65 | 74 75 72 6e 20 74 68 65 |thods re|turn the|
|00002d40| 0d 0a 6c 69 73 74 20 6f | 66 20 61 6c 6c 20 6f 66 |..list o|f all of|
|00002d50| 20 74 68 65 20 6f 62 6a | 65 63 74 73 20 69 6e 20 | the obj|ects in |
|00002d60| 74 68 65 20 61 63 74 6f | 72 27 73 20 69 6e 76 65 |the acto|r's inve|
|00002d70| 6e 74 6f 72 79 20 70 6c | 75 73 20 61 6c 6c 20 74 |ntory pl|us all t|
|00002d80| 68 65 69 72 0d 0a 63 6f | 6e 74 65 6e 74 73 20 28 |heir..co|ntents (|
|00002d90| 72 65 63 75 72 73 69 76 | 65 6c 79 29 2c 20 70 6c |recursiv|ely), pl|
|00002da0| 75 73 20 61 6c 6c 20 6f | 66 20 74 68 65 20 6f 62 |us all o|f the ob|
|00002db0| 6a 65 63 74 73 20 69 6e | 20 74 68 65 20 61 63 74 |jects in| the act|
|00002dc0| 6f 72 27 73 20 6c 6f 63 | 61 74 69 6f 6e 0d 0a 61 |or's loc|ation..a|
|00002dd0| 6e 64 20 74 68 65 69 72 | 20 63 6f 6e 74 65 6e 74 |nd their| content|
|00002de0| 73 20 28 72 65 63 75 72 | 73 69 76 65 6c 79 29 2c |s (recur|sively),|
|00002df0| 20 70 6c 75 73 20 61 6c | 6c 20 6f 66 20 74 68 65 | plus al|l of the|
|00002e00| 20 6f 62 6a 65 63 74 73 | 20 6f 66 20 63 6c 61 73 | objects| of clas|
|00002e10| 73 0d 0a 7b 5c 74 74 20 | 66 6c 6f 61 74 69 6e 67 |s..{\tt |floating|
|00002e20| 49 74 65 6d 7d 20 69 6e | 20 74 68 65 20 67 61 6d |Item} in| the gam|
|00002e30| 65 2e 0d 0a 0d 0a 54 68 | 65 20 6e 65 77 20 7b 5c |e.....Th|e new {\|
|00002e40| 74 74 20 66 6c 6f 61 74 | 69 6e 67 49 74 65 6d 7d |tt float|ingItem}|
|00002e50| 20 63 6c 61 73 73 20 7b | 5c 69 74 20 6d 75 73 74 | class {|\it must|
|00002e60| 7d 20 62 65 20 75 73 65 | 64 20 77 69 74 68 20 61 |} be use|d with a|
|00002e70| 6e 79 20 6f 62 6a 65 63 | 74 0d 0a 74 68 61 74 20 |ny objec|t..that |
|00002e80| 75 73 65 73 20 61 20 6d | 65 74 68 6f 64 20 66 6f |uses a m|ethod fo|
|00002e90| 72 20 69 74 73 20 7b 5c | 74 74 20 6c 6f 63 61 74 |r its {\|tt locat|
|00002ea0| 69 6f 6e 7d 20 70 72 6f | 70 65 72 74 79 2e 20 20 |ion} pro|perty. |
|00002eb0| 54 68 65 20 72 65 61 73 | 6f 6e 20 69 73 0d 0a 74 |The reas|on is..t|
|00002ec0| 68 61 74 20 6f 62 6a 65 | 63 74 73 20 77 69 74 68 |hat obje|cts with|
|00002ed0| 20 6e 6f 6e 2d 6f 62 6a | 65 63 74 20 7b 5c 74 74 | non-obj|ect {\tt|
|00002ee0| 20 6c 6f 63 61 74 69 6f | 6e 7d 20 76 61 6c 75 65 | locatio|n} value|
|00002ef0| 73 20 61 72 65 20 7b 5c | 69 74 20 6e 6f 74 7d 20 |s are {\|it not} |
|00002f00| 70 61 72 74 0d 0a 6f 66 | 20 61 6e 79 20 7b 5c 74 |part..of| any {\t|
|00002f10| 74 20 63 6f 6e 74 65 6e | 74 73 7d 20 6c 69 73 74 |t conten|ts} list|
|00002f20| 2c 20 73 6f 20 74 68 65 | 79 20 77 6f 75 6c 64 20 |, so the|y would |
|00002f30| 6e 6f 74 20 62 65 20 69 | 6e 63 6c 75 64 65 64 20 |not be i|ncluded |
|00002f40| 69 6e 20 74 68 65 0d 0a | 6c 69 73 74 73 20 72 65 |in the..|lists re|
|00002f50| 74 75 72 6e 65 64 20 62 | 79 20 7b 5c 74 74 20 76 |turned b|y {\tt v|
|00002f60| 61 6c 69 64 44 6f 4c 69 | 73 74 7d 20 61 6e 64 20 |alidDoLi|st} and |
|00002f70| 7b 5c 74 74 20 76 61 6c | 69 64 49 6f 4c 69 73 74 |{\tt val|idIoList|
|00002f80| 7d 2e 20 20 54 68 65 73 | 65 0d 0a 6d 65 74 68 6f |}. Thes|e..metho|
|00002f90| 64 73 20 69 6e 63 6c 75 | 64 65 20 74 68 65 20 6c |ds inclu|de the l|
|00002fa0| 69 73 74 20 6f 66 20 61 | 6c 6c 20 7b 5c 74 74 20 |ist of a|ll {\tt |
|00002fb0| 66 6c 6f 61 74 69 6e 67 | 49 74 65 6d 7d 20 6f 62 |floating|Item} ob|
|00002fc0| 6a 65 63 74 73 2c 20 68 | 6f 77 65 76 65 72 2c 0d |jects, h|owever,.|
|00002fd0| 0a 73 6f 20 64 65 63 6c | 61 72 69 6e 67 20 61 6c |.so decl|aring al|
|00002fe0| 6c 20 73 75 63 68 20 6f | 62 6a 65 63 74 73 20 74 |l such o|bjects t|
|00002ff0| 6f 20 62 65 20 6f 66 20 | 63 6c 61 73 73 20 7b 5c |o be of |class {\|
|00003000| 74 74 20 66 6c 6f 61 74 | 69 6e 67 49 74 65 6d 7d |tt float|ingItem}|
|00003010| 20 65 6e 73 75 72 65 73 | 0d 0a 74 68 61 74 20 74 | ensures|..that t|
|00003020| 68 65 79 27 72 65 20 61 | 63 63 65 73 73 69 62 6c |hey're a|ccessibl|
|00003030| 65 20 77 68 65 6e 20 61 | 70 70 72 6f 70 72 69 61 |e when a|ppropria|
|00003040| 74 65 2e 0d 0a 0d 0a 4f | 6e 65 20 6f 74 68 65 72 |te.....O|ne other|
|00003050| 20 66 65 61 74 75 72 65 | 20 6f 66 20 7b 5c 74 74 | feature| of {\tt|
|00003060| 20 76 61 6c 69 64 44 6f | 4c 69 73 74 7d 20 61 6e | validDo|List} an|
|00003070| 64 20 7b 5c 74 74 20 76 | 61 6c 69 64 49 6f 4c 69 |d {\tt v|alidIoLi|
|00003080| 73 74 7d 20 69 73 0d 0a | 74 68 61 74 20 72 65 74 |st} is..|that ret|
|00003090| 75 72 6e 69 6e 67 20 7b | 5c 74 74 20 6e 69 6c 7d |urning {|\tt nil}|
|000030a0| 20 69 73 20 65 71 75 69 | 76 61 6c 65 6e 74 20 74 | is equi|valent t|
|000030b0| 6f 20 72 65 74 75 72 6e | 69 6e 67 20 61 20 6c 69 |o return|ing a li|
|000030c0| 73 74 20 6f 66 0d 0a 65 | 76 65 72 79 20 6f 62 6a |st of..e|very obj|
|000030d0| 65 63 74 20 69 6e 20 74 | 68 65 20 65 6e 74 69 72 |ect in t|he entir|
|000030e0| 65 20 67 61 6d 65 2e 20 | 20 54 68 69 73 20 6d 65 |e game. | This me|
|000030f0| 61 6e 73 20 74 68 61 74 | 20 69 66 20 61 20 76 65 |ans that| if a ve|
|00003100| 72 62 20 64 6f 65 73 6e | 27 74 0d 0a 64 65 66 69 |rb doesn|'t..defi|
|00003110| 6e 65 20 74 68 65 73 65 | 20 6d 65 74 68 6f 64 73 |ne these| methods|
|00003120| 20 61 74 20 61 6c 6c 2c | 20 74 68 65 20 62 65 68 | at all,| the beh|
|00003130| 61 76 69 6f 72 20 69 73 | 20 63 6f 6d 70 61 74 69 |avior is| compati|
|00003140| 62 6c 65 20 77 69 74 68 | 20 70 72 69 6f 72 0d 0a |ble with| prior..|
|00003150| 76 65 72 73 69 6f 6e 73 | 20 6f 66 20 54 41 44 53 |versions| of TADS|
|00003160| 20 62 65 66 6f 72 65 20 | 74 68 65 20 69 6e 74 72 | before |the intr|
|00003170| 6f 64 75 63 74 69 6f 6e | 20 6f 66 20 74 68 65 73 |oduction| of thes|
|00003180| 65 20 6e 65 77 20 6d 65 | 74 68 6f 64 73 2e 0d 0a |e new me|thods...|
|00003190| 54 68 69 73 20 69 73 20 | 61 6c 73 6f 20 75 73 65 |This is |also use|
|000031a0| 66 75 6c 20 66 6f 72 20 | 76 65 72 62 73 20 73 75 |ful for |verbs su|
|000031b0| 63 68 20 61 73 20 60 60 | 61 73 6b 27 27 20 61 6e |ch as ``|ask'' an|
|000031c0| 64 20 60 60 74 65 6c 6c | 27 27 20 74 68 61 74 0d |d ``tell|'' that.|
|000031d0| 0a 73 68 6f 75 6c 64 20 | 61 6c 6c 6f 77 20 61 6e |.should |allow an|
|000031e0| 79 20 6f 62 6a 65 63 74 | 20 28 65 76 65 6e 20 69 |y object| (even i|
|000031f0| 6e 61 63 63 65 73 73 69 | 62 6c 65 20 6f 62 6a 65 |naccessi|ble obje|
|00003200| 63 74 73 29 20 74 6f 20 | 62 65 20 6d 65 6e 74 69 |cts) to |be menti|
|00003210| 6f 6e 65 64 2e 0d 0a 0d | 0a 0d 0a 5c 74 6f 70 69 |oned....|...\topi|
|00003220| 63 20 7b 5c 74 74 20 64 | 6f 62 6a 47 65 6e 7d 20 |c {\tt d|objGen} |
|00003230| 61 6e 64 20 7b 5c 74 74 | 20 69 6f 62 6a 47 65 6e |and {\tt| iobjGen|
|00003240| 7d 0d 0a 0d 0a 53 6f 6d | 65 74 69 6d 65 73 2c 20 |}....Som|etimes, |
|00003250| 79 6f 75 20 77 61 6e 74 | 20 74 6f 20 62 65 20 61 |you want| to be a|
|00003260| 62 6c 65 20 74 6f 20 64 | 65 66 69 6e 65 20 61 6e |ble to d|efine an|
|00003270| 20 6f 62 6a 65 63 74 20 | 74 68 61 74 20 68 61 6e | object |that han|
|00003280| 64 6c 65 73 20 6d 6f 73 | 74 0d 0a 6f 72 20 61 6c |dles mos|t..or al|
|00003290| 6c 20 76 65 72 62 73 20 | 69 6e 20 74 68 65 20 73 |l verbs |in the s|
|000032a0| 61 6d 65 20 6d 61 6e 6e | 65 72 2e 20 20 46 6f 72 |ame mann|er. For|
|000032b0| 20 65 78 61 6d 70 6c 65 | 2c 20 69 66 20 79 6f 75 | example|, if you|
|000032c0| 20 77 61 6e 74 65 64 20 | 74 6f 20 64 65 66 69 6e | wanted |to defin|
|000032d0| 65 0d 0a 61 20 64 69 73 | 74 61 6e 74 20 6f 62 6a |e..a dis|tant obj|
|000032e0| 65 63 74 2c 20 74 6f 6f | 20 66 61 72 20 61 77 61 |ect, too| far awa|
|000032f0| 79 20 74 6f 20 62 65 20 | 6d 61 6e 69 70 75 6c 61 |y to be |manipula|
|00003300| 74 65 64 2c 20 79 6f 75 | 27 64 20 6c 69 6b 65 20 |ted, you|'d like |
|00003310| 74 68 65 0d 0a 72 65 73 | 70 6f 6e 73 65 20 74 6f |the..res|ponse to|
|00003320| 20 61 6c 6d 6f 73 74 20 | 61 6e 79 20 76 65 72 62 | almost |any verb|
|00003330| 20 28 6f 74 68 65 72 20 | 74 68 61 6e 20 60 60 6c | (other |than ``l|
|00003340| 6f 6f 6b 20 61 74 27 27 | 29 20 74 6f 20 62 65 20 |ook at''|) to be |
|00003350| 73 6f 6d 65 74 68 69 6e | 67 0d 0a 6c 69 6b 65 20 |somethin|g..like |
|00003360| 60 60 49 74 27 73 20 74 | 6f 6f 20 66 61 72 20 61 |``It's t|oo far a|
|00003370| 77 61 79 2e 27 27 20 20 | 49 6e 20 70 72 65 76 69 |way.'' |In previ|
|00003380| 6f 75 73 20 76 65 72 73 | 69 6f 6e 73 2c 20 69 74 |ous vers|ions, it|
|00003390| 20 68 61 73 20 62 65 65 | 6e 0d 0a 76 65 72 79 20 | has bee|n..very |
|000033a0| 74 65 64 69 6f 75 73 20 | 74 6f 20 69 6d 70 6c 65 |tedious |to imple|
|000033b0| 6d 65 6e 74 20 73 75 63 | 68 20 6f 62 6a 65 63 74 |ment suc|h object|
|000033c0| 73 2c 20 62 65 63 61 75 | 73 65 20 79 6f 75 20 68 |s, becau|se you h|
|000033d0| 61 64 20 74 6f 20 70 72 | 6f 76 69 64 65 0d 0a 61 |ad to pr|ovide..a|
|000033e0| 20 63 75 73 74 6f 6d 69 | 7a 65 64 20 5c 76 65 72 | customi|zed \ver|
|000033f0| 44 6f 56 65 72 62 5c 20 | 6f 72 20 6f 74 68 65 72 |DoVerb\ |or other|
|00003400| 20 73 69 6d 69 6c 61 72 | 20 6d 65 74 68 6f 64 20 | similar| method |
|00003410| 66 6f 72 0d 0a 70 72 61 | 63 74 69 63 61 6c 6c 79 |for..pra|ctically|
|00003420| 20 65 76 65 72 79 20 70 | 6f 73 73 69 62 6c 65 20 | every p|ossible |
|00003430| 76 65 72 62 2e 0d 0a 0d | 0a 54 6f 20 6d 61 6b 65 |verb....|.To make|
|00003440| 20 74 68 69 73 20 74 79 | 70 65 20 6f 66 20 6f 62 | this ty|pe of ob|
|00003450| 6a 65 63 74 20 65 61 73 | 69 65 72 20 74 6f 20 69 |ject eas|ier to i|
|00003460| 6d 70 6c 65 6d 65 6e 74 | 2c 20 74 68 65 20 70 61 |mplement|, the pa|
|00003470| 72 73 65 72 20 77 69 6c | 6c 20 6e 6f 77 0d 0a 63 |rser wil|l now..c|
|00003480| 61 6c 6c 20 61 20 73 70 | 65 63 69 61 6c 20 6d 65 |all a sp|ecial me|
|00003490| 74 68 6f 64 20 69 6e 20 | 74 68 65 20 64 69 72 65 |thod in |the dire|
|000034a0| 63 74 20 61 6e 64 20 69 | 6e 64 69 72 65 63 74 20 |ct and i|ndirect |
|000034b0| 6f 62 6a 65 63 74 20 65 | 61 72 6c 79 20 69 6e 20 |object e|arly in |
|000034c0| 74 68 65 0d 0a 70 61 72 | 73 65 72 20 6c 6f 6f 70 |the..par|ser loop|
|000034d0| 2e 20 20 54 68 65 20 6e | 65 77 20 70 72 6f 70 65 |. The n|ew prope|
|000034e0| 72 74 79 20 66 6f 72 20 | 61 20 64 69 72 65 63 74 |rty for |a direct|
|000034f0| 20 6f 62 6a 65 63 74 20 | 69 73 20 7b 5c 74 74 20 | object |is {\tt |
|00003500| 64 6f 62 6a 47 65 6e 7d | 2c 0d 0a 61 6e 64 20 66 |dobjGen}|,..and f|
|00003510| 6f 72 20 61 6e 20 69 6e | 64 69 72 65 63 74 20 6f |or an in|direct o|
|00003520| 62 6a 65 63 74 20 69 74 | 20 69 73 20 7b 5c 74 74 |bject it| is {\tt|
|00003530| 20 69 6f 62 6a 47 65 6e | 7d 2e 20 20 54 68 65 73 | iobjGen|}. Thes|
|00003540| 65 20 6d 65 74 68 6f 64 | 73 20 61 72 65 0d 0a 63 |e method|s are..c|
|00003550| 61 6c 6c 65 64 20 69 6d | 6d 65 64 69 61 74 65 6c |alled im|mediatel|
|00003560| 79 20 61 66 74 65 72 20 | 74 68 65 20 7b 5c 74 74 |y after |the {\tt|
|00003570| 20 72 6f 6f 6d 41 63 74 | 69 6f 6e 7d 20 6d 65 74 | roomAct|ion} met|
|00003580| 68 6f 64 2c 20 61 6e 64 | 20 6a 75 73 74 20 62 65 |hod, and| just be|
|00003590| 66 6f 72 65 0d 0a 74 68 | 65 20 66 69 72 73 74 20 |fore..th|e first |
|000035a0| 5c 76 65 72 49 6f 56 65 | 72 62 5c 20 6f 72 20 5c |\verIoVe|rb\ or \|
|000035b0| 76 65 72 44 6f 56 65 72 | 62 5c 20 6d 65 74 68 6f |verDoVer|b\ metho|
|000035c0| 64 2e 0d 0a 54 68 65 73 | 65 20 6d 65 74 68 6f 64 |d...Thes|e method|
|000035d0| 73 20 61 72 65 20 63 61 | 6c 6c 65 64 20 77 69 74 |s are ca|lled wit|
|000035e0| 68 20 74 68 65 73 65 20 | 70 61 72 61 6d 65 74 65 |h these |paramete|
|000035f0| 72 73 3a 0d 0a 0d 0a 7b | 5c 65 78 61 6d 70 6c 65 |rs:....{|\example|
|00003600| 0d 0a 64 6f 62 6a 2e 64 | 6f 62 6a 47 65 6e 28 61 |..dobj.d|objGen(a|
|00003610| 63 74 6f 72 2c 20 76 65 | 72 62 2c 20 69 6f 62 6a |ctor, ve|rb, iobj|
|00003620| 2c 20 70 72 65 70 29 0d | 0a 69 6f 62 6a 2e 69 6f |, prep).|.iobj.io|
|00003630| 62 6a 47 65 6e 28 61 63 | 74 6f 72 2c 20 76 65 72 |bjGen(ac|tor, ver|
|00003640| 62 2c 20 64 6f 62 6a 2c | 20 70 72 65 70 29 0d 0a |b, dobj,| prep)..|
|00003650| 7d 5c 6d 65 64 73 6b 69 | 70 5c 6e 6f 69 6e 64 65 |}\medski|p\noinde|
|00003660| 6e 74 0d 0a 41 6e 79 20 | 70 61 72 61 6d 65 74 65 |nt..Any |paramete|
|00003670| 72 73 20 74 68 61 74 20 | 61 72 65 6e 27 74 20 6d |rs that |aren't m|
|00003680| 65 61 6e 69 6e 67 66 75 | 6c 20 66 6f 72 20 74 68 |eaningfu|l for th|
|00003690| 65 20 63 6f 6d 6d 61 6e | 64 20 28 66 6f 72 20 65 |e comman|d (for e|
|000036a0| 78 61 6d 70 6c 65 2c 0d | 0a 7b 5c 74 74 20 70 72 |xample,.|.{\tt pr|
|000036b0| 65 70 7d 20 61 6e 64 20 | 7b 5c 74 74 20 69 6f 62 |ep} and |{\tt iob|
|000036c0| 6a 7d 20 66 6f 72 20 61 | 20 63 6f 6d 6d 61 6e 64 |j} for a| command|
|000036d0| 20 77 69 74 68 20 6e 6f | 20 69 6e 64 69 72 65 63 | with no| indirec|
|000036e0| 74 20 6f 62 6a 65 63 74 | 29 20 77 69 6c 6c 0d 0a |t object|) will..|
|000036f0| 62 65 20 70 61 73 73 65 | 64 20 61 73 20 7b 5c 74 |be passe|d as {\t|
|00003700| 74 20 6e 69 6c 7d 2e 0d | 0a 0d 0a 41 66 74 65 72 |t nil}..|...After|
|00003710| 20 63 61 6c 6c 69 6e 67 | 20 74 68 65 73 65 20 6d | calling| these m|
|00003720| 65 74 68 6f 64 73 2c 20 | 74 68 65 20 70 61 72 73 |ethods, |the pars|
|00003730| 65 72 20 77 69 6c 6c 20 | 70 72 6f 63 65 65 64 20 |er will |proceed |
|00003740| 74 6f 20 74 68 65 0d 0a | 5c 76 65 72 49 6f 56 65 |to the..|\verIoVe|
|00003750| 72 62 5c 20 6f 72 20 5c | 76 65 72 44 6f 56 65 72 |rb\ or \|verDoVer|
|00003760| 62 5c 20 6d 65 74 68 6f | 64 20 61 73 20 6e 6f 72 |b\ metho|d as nor|
|00003770| 6d 61 6c 2e 0d 0a 54 68 | 65 73 65 20 6d 65 74 68 |mal...Th|ese meth|
|00003780| 6f 64 73 20 73 68 6f 75 | 6c 64 20 75 73 65 20 7b |ods shou|ld use {|
|00003790| 5c 74 74 20 65 78 69 74 | 7d 20 69 66 20 74 68 65 |\tt exit|} if the|
|000037a0| 79 20 77 61 6e 74 20 74 | 6f 20 73 74 6f 70 20 74 |y want t|o stop t|
|000037b0| 68 65 20 63 6f 6d 6d 61 | 6e 64 0d 0a 77 69 74 68 |he comma|nd..with|
|000037c0| 6f 75 74 20 61 6e 79 20 | 66 75 72 74 68 65 72 20 |out any |further |
|000037d0| 70 72 6f 63 65 73 73 69 | 6e 67 2e 0d 0a 0d 0a 49 |processi|ng.....I|
|000037e0| 6e 20 63 65 72 74 61 69 | 6e 20 63 61 73 65 73 2c |n certai|n cases,|
|000037f0| 20 74 68 65 20 70 61 72 | 73 65 72 20 64 6f 65 73 | the par|ser does|
|00003800| 20 7b 5c 69 74 20 6e 6f | 74 7d 20 63 61 6c 6c 20 | {\it no|t} call |
|00003810| 7b 5c 74 74 20 64 6f 62 | 6a 47 65 6e 7d 20 6f 72 |{\tt dob|jGen} or|
|00003820| 0d 0a 7b 5c 74 74 20 69 | 6f 62 6a 47 65 6e 7d 2e |..{\tt i|objGen}.|
|00003830| 20 20 54 68 65 73 65 20 | 6d 65 74 68 6f 64 73 20 | These |methods |
|00003840| 77 69 6c 6c 20 62 65 20 | 63 61 6c 6c 65 64 20 7b |will be |called {|
|00003850| 5c 69 74 20 6f 6e 6c 79 | 7d 20 77 68 65 6e 20 74 |\it only|} when t|
|00003860| 68 65 79 0d 0a 65 66 66 | 65 63 74 69 76 65 6c 79 |hey..eff|ectively|
|00003870| 20 6f 76 65 72 72 69 64 | 65 20 74 68 65 20 61 63 | overrid|e the ac|
|00003880| 74 75 61 6c 20 76 65 72 | 62 20 68 61 6e 64 6c 65 |tual ver|b handle|
|00003890| 72 20 66 6f 72 20 74 68 | 65 20 6f 62 6a 65 63 74 |r for th|e object|
|000038a0| 2d 2d 2d 74 68 61 74 0d | 0a 69 73 2c 20 77 68 65 |---that.|.is, whe|
|000038b0| 6e 20 74 68 65 20 76 65 | 72 62 20 68 61 6e 64 6c |n the ve|rb handl|
|000038c0| 65 72 20 69 73 20 69 6e | 68 65 72 69 74 65 64 2c |er is in|herited,|
|000038d0| 20 7b 5c 69 74 20 6e 6f | 74 7d 20 64 65 66 69 6e | {\it no|t} defin|
|000038e0| 65 64 20 64 69 72 65 63 | 74 6c 79 0d 0a 69 6e 20 |ed direc|tly..in |
|000038f0| 74 68 65 20 6f 62 6a 65 | 63 74 20 64 65 66 69 6e |the obje|ct defin|
|00003900| 69 6e 67 20 7b 5c 74 74 | 20 64 6f 62 6a 47 65 6e |ing {\tt| dobjGen|
|00003910| 7d 20 6f 72 20 7b 5c 74 | 74 20 69 6f 62 6a 47 65 |} or {\t|t iobjGe|
|00003920| 6e 7d 20 28 6f 72 20 62 | 79 20 61 20 73 75 62 63 |n} (or b|y a subc|
|00003930| 6c 61 73 73 0d 0a 6f 66 | 20 74 68 61 74 20 6f 62 |lass..of| that ob|
|00003940| 6a 65 63 74 29 2e 20 20 | 54 68 69 73 20 61 6c 6c |ject). |This all|
|00003950| 6f 77 73 20 79 6f 75 20 | 74 6f 20 65 78 63 6c 75 |ows you |to exclu|
|00003960| 64 65 20 76 65 72 62 73 | 20 66 72 6f 6d 20 74 68 |de verbs| from th|
|00003970| 65 20 67 65 6e 65 72 61 | 6c 0d 0a 68 61 6e 64 6c |e genera|l..handl|
|00003980| 69 6e 67 20 6f 66 20 7b | 5c 74 74 20 64 6f 62 6a |ing of {|\tt dobj|
|00003990| 47 65 6e 7d 20 61 6e 64 | 20 7b 5c 74 74 20 69 6f |Gen} and| {\tt io|
|000039a0| 62 6a 47 65 6e 7d 2c 20 | 73 69 6d 70 6c 79 20 62 |bjGen}, |simply b|
|000039b0| 79 20 69 6e 63 6c 75 64 | 69 6e 67 0d 0a 73 70 65 |y includ|ing..spe|
|000039c0| 63 69 66 69 63 20 68 61 | 6e 64 6c 65 72 73 20 66 |cific ha|ndlers f|
|000039d0| 6f 72 20 74 68 6f 73 65 | 20 76 65 72 62 73 20 69 |or those| verbs i|
|000039e0| 6e 20 74 68 65 20 6f 62 | 6a 65 63 74 20 64 65 66 |n the ob|ject def|
|000039f0| 69 6e 69 6e 67 20 74 68 | 65 20 67 65 6e 65 72 61 |ining th|e genera|
|00003a00| 6c 0d 0a 68 61 6e 64 6c | 65 72 2e 0d 0a 0d 0a 7b |l..handl|er.....{|
|00003a10| 5c 74 74 20 64 6f 62 6a | 47 65 6e 7d 20 61 6e 64 |\tt dobj|Gen} and|
|00003a20| 20 7b 5c 74 74 20 69 6f | 62 6a 47 65 6e 7d 20 6d | {\tt io|bjGen} m|
|00003a30| 61 6b 65 20 69 74 20 76 | 65 72 79 20 65 61 73 79 |ake it v|ery easy|
|00003a40| 20 74 6f 20 64 65 66 69 | 6e 65 20 61 20 64 69 73 | to defi|ne a dis|
|00003a50| 74 61 6e 74 0d 0a 6f 62 | 6a 65 63 74 20 6f 72 20 |tant..ob|ject or |
|00003a60| 61 20 73 69 6d 69 6c 61 | 72 20 74 79 70 65 20 6f |a simila|r type o|
|00003a70| 66 20 6f 62 6a 65 63 74 | 2e 20 20 49 6e 20 74 68 |f object|. In th|
|00003a80| 65 20 65 78 61 6d 70 6c | 65 20 62 65 6c 6f 77 2c |e exampl|e below,|
|00003a90| 20 65 76 65 72 79 20 76 | 65 72 62 0d 0a 65 78 63 | every v|erb..exc|
|00003aa0| 65 70 74 20 66 6f 72 20 | 60 60 6c 6f 6f 6b 20 61 |ept for |``look a|
|00003ab0| 74 27 27 20 77 69 6c 6c | 20 72 65 73 70 6f 6e 64 |t'' will| respond|
|00003ac0| 20 77 69 74 68 20 74 68 | 65 20 6d 65 73 73 61 67 | with th|e messag|
|00003ad0| 65 20 60 60 49 74 27 73 | 20 74 6f 6f 20 66 61 72 |e ``It's| too far|
|00003ae0| 0d 0a 61 77 61 79 2c 27 | 27 20 62 65 63 61 75 73 |..away,'|' becaus|
|00003af0| 65 20 7b 5c 74 74 20 64 | 6f 62 6a 47 65 6e 7d 20 |e {\tt d|objGen} |
|00003b00| 6f 72 20 7b 5c 74 74 20 | 69 6f 62 6a 47 65 6e 7d |or {\tt |iobjGen}|
|00003b10| 20 77 69 6c 6c 20 62 65 | 20 63 61 6c 6c 65 64 20 | will be| called |
|00003b20| 70 72 69 6f 72 0d 0a 74 | 6f 20 61 6e 79 20 6f 74 |prior..t|o any ot|
|00003b30| 68 65 72 20 70 72 6f 63 | 65 73 73 69 6e 67 20 6f |her proc|essing o|
|00003b40| 6e 20 74 68 65 20 76 65 | 72 62 2e 20 20 54 68 65 |n the ve|rb. The|
|00003b50| 20 72 65 61 73 6f 6e 20 | 74 68 61 74 20 60 60 6c | reason |that ``l|
|00003b60| 6f 6f 6b 20 61 74 27 27 | 0d 0a 69 73 20 6e 6f 74 |ook at''|..is not|
|00003b70| 20 63 61 75 67 68 74 20 | 62 65 20 7b 5c 74 74 20 | caught |be {\tt |
|00003b80| 64 6f 62 6a 47 65 6e 7d | 20 69 73 20 74 68 61 74 |dobjGen}| is that|
|00003b90| 20 7b 5c 74 74 20 76 65 | 72 44 6f 49 6e 73 70 65 | {\tt ve|rDoInspe|
|00003ba0| 63 74 7d 20 69 73 20 64 | 65 66 69 6e 65 64 0d 0a |ct} is d|efined..|
|00003bb0| 69 6e 20 74 68 65 20 6f | 62 6a 65 63 74 2d 2d 2d |in the o|bject---|
|00003bc0| 74 68 69 73 20 65 66 66 | 65 63 74 69 76 65 6c 79 |this eff|ectively|
|00003bd0| 20 6f 76 65 72 72 69 64 | 65 73 20 7b 5c 74 74 20 | overrid|es {\tt |
|00003be0| 64 6f 62 6a 47 65 6e 7d | 2e 20 20 41 6e 79 0d 0a |dobjGen}|. Any..|
|00003bf0| 5c 76 65 72 44 6f 56 65 | 72 62 5c 20 6d 65 74 68 |\verDoVe|rb\ meth|
|00003c00| 6f 64 73 20 64 65 66 69 | 6e 65 64 20 62 79 20 73 |ods defi|ned by s|
|00003c10| 75 62 63 6c 61 73 73 65 | 73 20 6f 66 0d 0a 7b 5c |ubclasse|s of..{\|
|00003c20| 74 74 20 64 69 73 74 61 | 6e 74 49 74 65 6d 7d 20 |tt dista|ntItem} |
|00003c30| 77 6f 75 6c 64 20 68 61 | 76 65 20 74 68 65 20 73 |would ha|ve the s|
|00003c40| 61 6d 65 20 65 66 66 65 | 63 74 20 66 6f 72 20 74 |ame effe|ct for t|
|00003c50| 68 6f 73 65 20 73 75 62 | 63 6c 61 73 73 65 73 2e |hose sub|classes.|
|00003c60| 0d 0a 0d 0a 7b 5c 65 78 | 61 6d 70 6c 65 0d 0a 5c |....{\ex|ample..\|
|00003c70| 6f 62 6a 65 63 74 7b 63 | 6c 61 73 73 20 64 69 73 |object{c|lass dis|
|00003c80| 74 61 6e 74 49 74 65 6d | 3a 20 69 74 65 6d 7d 0d |tantItem|: item}.|
|00003c90| 0a 20 20 20 20 64 6f 62 | 6a 47 65 6e 28 61 63 74 |. dob|jGen(act|
|00003ca0| 6f 72 2c 20 76 65 72 62 | 2c 20 69 6f 62 6a 2c 20 |or, verb|, iobj, |
|00003cb0| 70 72 65 70 29 20 3d 0d | 0a 20 20 20 20 5c 6c 62 |prep) =.|. \lb|
|00003cc0| 0d 0a 20 20 20 20 20 20 | 20 20 22 49 74 27 73 20 |.. | "It's |
|00003cd0| 74 6f 6f 20 66 61 72 20 | 61 77 61 79 2e 22 3b 0d |too far |away.";.|
|00003ce0| 0a 09 65 78 69 74 3b 0d | 0a 20 20 20 20 5c 72 62 |..exit;.|. \rb|
|00003cf0| 0d 0a 20 20 20 20 69 6f | 62 6a 47 65 6e 28 61 63 |.. io|bjGen(ac|
|00003d00| 74 6f 72 2c 20 76 65 72 | 62 2c 20 64 6f 62 6a 2c |tor, ver|b, dobj,|
|00003d10| 20 70 72 65 70 29 20 3d | 0d 0a 20 20 20 20 5c 6c | prep) =|.. \l|
|00003d20| 62 0d 0a 20 20 20 20 20 | 20 20 20 73 65 6c 66 2e |b.. | self.|
|00003d30| 64 6f 62 6a 47 65 6e 28 | 61 63 74 6f 72 2c 20 76 |dobjGen(|actor, v|
|00003d40| 65 72 62 2c 20 64 6f 62 | 6a 2c 20 70 72 65 70 29 |erb, dob|j, prep)|
|00003d50| 3b 0d 0a 20 20 20 20 5c | 72 62 0d 0a 20 20 20 20 |;.. \|rb.. |
|00003d60| 76 65 72 44 6f 49 6e 73 | 70 65 63 74 28 61 63 74 |verDoIns|pect(act|
|00003d70| 6f 72 29 20 3d 0d 0a 20 | 20 20 20 5c 6c 62 0d 0a |or) =.. | \lb..|
|00003d80| 20 20 20 20 20 20 20 20 | 70 61 73 73 20 76 65 72 | |pass ver|
|00003d90| 44 6f 49 6e 73 70 65 63 | 74 3b 0d 0a 20 20 20 20 |DoInspec|t;.. |
|00003da0| 5c 72 62 0d 0a 5c 65 6e | 64 6f 62 6a 0d 0a 7d 5c |\rb..\en|dobj..}\|
|00003db0| 6d 65 64 73 6b 69 70 0d | 0a 0d 0a 5c 74 6f 70 69 |medskip.|...\topi|
|00003dc0| 63 20 4e 65 77 20 61 6e | 64 20 69 6d 70 72 6f 76 |c New an|d improv|
|00003dd0| 65 64 20 62 75 69 6c 74 | 2d 69 6e 20 66 75 6e 63 |ed built|-in func|
|00003de0| 74 69 6f 6e 73 0d 0a 0d | 0a 53 65 76 65 72 61 6c |tions...|.Several|
|00003df0| 20 6e 65 77 20 62 75 69 | 6c 74 2d 69 6e 20 66 75 | new bui|lt-in fu|
|00003e00| 6e 63 74 69 6f 6e 73 20 | 68 61 76 65 20 62 65 65 |nctions |have bee|
|00003e10| 6e 20 61 64 64 65 64 2c | 20 61 6e 64 20 61 20 66 |n added,| and a f|
|00003e20| 65 77 20 6f 66 20 74 68 | 65 0d 0a 65 78 69 73 74 |ew of th|e..exist|
|00003e30| 69 6e 67 20 66 75 6e 63 | 74 69 6f 6e 73 20 68 61 |ing func|tions ha|
|00003e40| 76 65 20 62 65 65 6e 20 | 65 6e 68 61 6e 63 65 64 |ve been |enhanced|
|00003e50| 20 74 6f 20 70 72 6f 76 | 69 64 65 20 61 64 64 69 | to prov|ide addi|
|00003e60| 74 69 6f 6e 61 6c 20 66 | 65 61 74 75 72 65 73 2e |tional f|eatures.|
|00003e70| 0d 0a 0d 0a 5c 64 65 66 | 5c 62 69 66 23 31 7b 5c |....\def|\bif#1{\|
|00003e80| 76 73 6b 69 70 20 31 31 | 70 74 5c 6e 6f 69 6e 64 |vskip 11|pt\noind|
|00003e90| 65 6e 74 7b 5c 74 74 20 | 23 31 7d 3a 20 7d 0d 0a |ent{\tt |#1}: }..|
|00003ea0| 0d 0a 5c 62 69 66 7b 67 | 65 74 66 75 73 65 28 7b |..\bif{g|etfuse({|
|00003eb0| 5c 69 74 20 66 75 6e 63 | 70 74 72 2c 20 70 61 72 |\it func|ptr, par|
|00003ec0| 6d 7d 29 7d 54 68 69 73 | 20 66 75 6e 63 74 69 6f |m})}This| functio|
|00003ed0| 6e 20 6c 65 74 73 20 79 | 6f 75 20 64 65 74 65 72 |n lets y|ou deter|
|00003ee0| 6d 69 6e 65 20 69 66 0d | 0a 74 68 65 20 69 6e 64 |mine if.|.the ind|
|00003ef0| 69 63 61 74 65 64 20 66 | 75 73 65 20 69 73 20 73 |icated f|use is s|
|00003f00| 74 69 6c 6c 20 61 63 74 | 69 76 65 2c 20 61 6e 64 |till act|ive, and|
|00003f10| 20 69 66 20 73 6f 2c 20 | 68 6f 77 20 6d 61 6e 79 | if so, |how many|
|00003f20| 20 74 75 72 6e 73 20 61 | 72 65 0d 0a 6c 65 66 74 | turns a|re..left|
|00003f30| 20 75 6e 74 69 6c 20 69 | 74 20 69 73 20 61 63 74 | until i|t is act|
|00003f40| 69 76 61 74 65 64 2e 20 | 20 49 66 20 74 68 65 20 |ivated. | If the |
|00003f50| 66 75 73 65 20 69 73 20 | 6e 6f 74 20 61 63 74 69 |fuse is |not acti|
|00003f60| 76 65 20 28 65 69 74 68 | 65 72 20 69 74 20 68 61 |ve (eith|er it ha|
|00003f70| 73 0d 0a 61 6c 72 65 61 | 64 79 20 66 69 72 65 64 |s..alrea|dy fired|
|00003f80| 2c 20 6f 72 20 69 74 20 | 68 61 73 20 62 65 65 6e |, or it |has been|
|00003f90| 20 72 65 6d 6f 76 65 64 | 20 77 69 74 68 20 61 20 | removed| with a |
|00003fa0| 63 61 6c 6c 20 74 6f 20 | 7b 5c 74 74 20 72 65 6d |call to |{\tt rem|
|00003fb0| 66 75 73 65 7d 29 2c 0d | 0a 74 68 69 73 20 66 75 |fuse}),.|.this fu|
|00003fc0| 6e 63 74 69 6f 6e 20 72 | 65 74 75 72 6e 73 20 7b |nction r|eturns {|
|00003fd0| 5c 74 74 20 6e 69 6c 7d | 2e 20 20 4f 74 68 65 72 |\tt nil}|. Other|
|00003fe0| 77 69 73 65 2c 20 69 74 | 20 72 65 74 75 72 6e 73 |wise, it| returns|
|00003ff0| 20 74 68 65 20 6e 75 6d | 62 65 72 0d 0a 6f 66 20 | the num|ber..of |
|00004000| 74 75 72 6e 73 20 62 65 | 66 6f 72 65 20 74 68 65 |turns be|fore the|
|00004010| 20 66 75 73 65 20 69 73 | 20 61 63 74 69 76 61 74 | fuse is| activat|
|00004020| 65 64 2e 0d 0a 0d 0a 5c | 62 69 66 7b 67 65 74 66 |ed.....\|bif{getf|
|00004030| 75 73 65 28 7b 5c 69 74 | 20 6f 62 6a 2c 20 7d 5c |use({\it| obj, }\|
|00004040| 26 7b 5c 69 74 20 6d 73 | 67 7d 29 7d 54 68 69 73 |&{\it ms|g})}This|
|00004050| 20 66 6f 72 6d 20 6f 66 | 20 7b 5c 74 74 20 67 65 | form of| {\tt ge|
|00004060| 74 66 75 73 65 7d 20 6c | 65 74 73 20 79 6f 75 20 |tfuse} l|ets you |
|00004070| 63 68 65 63 6b 0d 0a 6f | 6e 20 61 20 66 75 73 65 |check..o|n a fuse|
|00004080| 20 73 65 74 20 77 69 74 | 68 20 74 68 65 20 7b 5c | set wit|h the {\|
|00004090| 74 74 20 6e 6f 74 69 66 | 79 7d 20 66 75 6e 63 74 |tt notif|y} funct|
|000040a0| 69 6f 6e 2e 20 20 49 66 | 20 74 68 65 20 66 75 73 |ion. If| the fus|
|000040b0| 65 20 68 61 73 0d 0a 61 | 6c 72 65 61 64 79 20 62 |e has..a|lready b|
|000040c0| 65 65 6e 20 66 69 72 65 | 64 2c 20 6f 72 20 68 61 |een fire|d, or ha|
|000040d0| 73 20 62 65 65 6e 20 72 | 65 6d 6f 76 65 64 20 77 |s been r|emoved w|
|000040e0| 69 74 68 20 7b 5c 74 74 | 20 75 6e 6e 6f 74 69 66 |ith {\tt| unnotif|
|000040f0| 79 7d 2c 20 74 68 69 73 | 0d 0a 66 75 6e 63 74 69 |y}, this|..functi|
|00004100| 6f 6e 20 72 65 74 75 72 | 6e 73 20 7b 5c 74 74 20 |on retur|ns {\tt |
|00004110| 6e 69 6c 7d 2e 20 20 4f | 74 68 65 72 77 69 73 65 |nil}. O|therwise|
|00004120| 2c 20 69 74 20 72 65 74 | 75 72 6e 73 20 74 68 65 |, it ret|urns the|
|00004130| 20 6e 75 6d 62 65 72 20 | 6f 66 0d 0a 74 75 72 6e | number |of..turn|
|00004140| 73 20 62 65 66 6f 72 65 | 20 74 68 65 20 66 75 73 |s before| the fus|
|00004150| 65 20 69 73 20 61 63 74 | 69 76 61 74 65 64 2e 0d |e is act|ivated..|
|00004160| 0a 0d 0a 5c 62 69 66 7b | 67 65 74 74 69 6d 65 28 |...\bif{|gettime(|
|00004170| 29 7d 52 65 74 75 72 6e | 73 20 74 68 65 20 63 75 |)}Return|s the cu|
|00004180| 72 72 65 6e 74 20 73 79 | 73 74 65 6d 20 63 6c 6f |rrent sy|stem clo|
|00004190| 63 6b 20 74 69 6d 65 2e | 20 20 54 68 65 20 74 69 |ck time.| The ti|
|000041a0| 6d 65 20 69 73 0d 0a 72 | 65 74 75 72 6e 65 64 20 |me is..r|eturned |
|000041b0| 61 73 20 61 20 6c 69 73 | 74 20 6f 66 20 6e 75 6d |as a lis|t of num|
|000041c0| 65 72 69 63 20 76 61 6c | 75 65 73 20 66 6f 72 20 |eric val|ues for |
|000041d0| 65 61 73 79 20 70 72 6f | 63 65 73 73 69 6e 67 2e |easy pro|cessing.|
|000041e0| 0d 0a 0d 0a 5c 62 69 67 | 73 6b 69 70 0d 0a 5c 68 |....\big|skip..\h|
|000041f0| 62 6f 78 20 74 6f 5c 68 | 73 69 7a 65 7b 5c 68 66 |box to\h|size{\hf|
|00004200| 69 6c 6c 5c 76 62 6f 78 | 7b 25 0d 0a 5c 68 61 6c |ill\vbox|{%..\hal|
|00004210| 69 67 6e 7b 5c 68 66 69 | 6c 7b 5c 74 74 20 5b 23 |ign{\hfi|l{\tt [#|
|00004220| 5d 7d 26 5c 68 73 6b 69 | 70 20 32 65 6d 23 5c 68 |]}&\hski|p 2em#\h|
|00004230| 66 69 6c 26 5c 68 73 6b | 69 70 32 65 6d 23 5c 68 |fil&\hsk|ip2em#\h|
|00004240| 66 69 6c 5c 63 72 0d 0a | 31 26 79 65 61 72 26 63 |fil\cr..|1&year&c|
|00004250| 61 6c 65 6e 64 61 72 20 | 79 65 61 72 20 28 65 2e |alendar |year (e.|
|00004260| 67 2e 2c 20 31 39 39 32 | 29 5c 63 72 0d 0a 32 26 |g., 1992|)\cr..2&|
|00004270| 6d 6f 6e 74 68 26 6d 6f | 6e 74 68 20 6e 75 6d 62 |month&mo|nth numb|
|00004280| 65 72 20 28 31 20 66 6f | 72 20 4a 61 6e 75 61 72 |er (1 fo|r Januar|
|00004290| 79 2c 20 32 20 66 6f 72 | 20 46 65 62 72 75 61 72 |y, 2 for| Februar|
|000042a0| 79 2c 20 65 74 63 2e 29 | 5c 63 72 0d 0a 33 26 64 |y, etc.)|\cr..3&d|
|000042b0| 61 79 26 64 61 79 20 6f | 66 20 74 68 65 20 6d 6f |ay&day o|f the mo|
|000042c0| 6e 74 68 5c 63 72 0d 0a | 34 26 77 65 65 6b 64 61 |nth\cr..|4&weekda|
|000042d0| 79 26 64 61 79 20 6f 66 | 20 74 68 65 20 77 65 65 |y&day of| the wee|
|000042e0| 6b 20 28 31 20 66 6f 72 | 20 53 75 6e 64 61 79 2c |k (1 for| Sunday,|
|000042f0| 20 32 20 66 6f 72 20 4d | 6f 6e 64 61 79 2c 20 65 | 2 for M|onday, e|
|00004300| 74 63 2e 29 5c 63 72 0d | 0a 35 26 79 65 61 72 64 |tc.)\cr.|.5&yeard|
|00004310| 61 79 26 64 61 79 20 6f | 66 20 74 68 65 20 79 65 |ay&day o|f the ye|
|00004320| 61 72 20 28 31 20 66 6f | 72 20 4a 61 6e 75 61 72 |ar (1 fo|r Januar|
|00004330| 79 20 31 29 5c 63 72 0d | 0a 36 26 68 6f 75 72 26 |y 1)\cr.|.6&hour&|
|00004340| 68 6f 75 72 20 6f 66 20 | 74 68 65 20 64 61 79 20 |hour of |the day |
|00004350| 6f 6e 20 32 34 2d 68 6f | 75 72 20 63 6c 6f 63 6b |on 24-ho|ur clock|
|00004360| 20 28 6d 69 64 6e 69 67 | 68 74 20 69 73 20 30 29 | (midnig|ht is 0)|
|00004370| 5c 63 72 0d 0a 37 26 6d | 69 6e 75 74 65 26 6d 69 |\cr..7&m|inute&mi|
|00004380| 6e 75 74 65 20 77 69 74 | 68 69 6e 20 74 68 65 20 |nute wit|hin the |
|00004390| 68 6f 75 72 20 28 30 20 | 74 6f 20 35 39 29 5c 63 |hour (0 |to 59)\c|
|000043a0| 72 0d 0a 38 26 73 65 63 | 6f 6e 64 26 73 65 63 6f |r..8&sec|ond&seco|
|000043b0| 6e 64 20 77 69 74 68 69 | 6e 20 74 68 65 20 6d 69 |nd withi|n the mi|
|000043c0| 6e 75 74 65 20 28 30 20 | 74 6f 20 35 39 29 5c 63 |nute (0 |to 59)\c|
|000043d0| 72 0d 0a 39 26 65 6c 61 | 70 73 65 64 26 73 65 63 |r..9&ela|psed&sec|
|000043e0| 6f 6e 64 73 20 73 69 6e | 63 65 20 4a 61 6e 75 61 |onds sin|ce Janua|
|000043f0| 72 79 20 31 2c 20 31 39 | 37 30 2c 20 30 30 3a 30 |ry 1, 19|70, 00:0|
|00004400| 30 3a 30 30 20 47 4d 54 | 5c 63 72 0d 0a 7d 7d 5c |0:00 GMT|\cr..}}\|
|00004410| 68 66 69 6c 6c 7d 5c 76 | 73 6b 69 70 30 70 74 0d |hfill}\v|skip0pt.|
|00004420| 0a 0d 0a 5c 62 69 66 7b | 69 6e 70 75 74 6b 65 79 |...\bif{|inputkey|
|00004430| 28 29 7d 52 65 61 64 73 | 20 61 20 73 69 6e 67 6c |()}Reads| a singl|
|00004440| 65 20 6b 65 79 73 74 72 | 6f 6b 65 20 66 72 6f 6d |e keystr|oke from|
|00004450| 20 74 68 65 20 6b 65 79 | 62 6f 61 72 64 2c 20 61 | the key|board, a|
|00004460| 6e 64 20 72 65 74 75 72 | 6e 73 0d 0a 61 20 73 74 |nd retur|ns..a st|
|00004470| 72 69 6e 67 20 63 6f 6e | 73 69 73 74 69 6e 67 20 |ring con|sisting |
|00004480| 6f 66 20 74 68 65 20 63 | 68 61 72 61 63 74 65 72 |of the c|haracter|
|00004490| 20 72 65 61 64 2e 20 20 | 7b 5c 74 74 20 69 6e 70 | read. |{\tt inp|
|000044a0| 75 74 6b 65 79 28 29 7d | 20 74 61 6b 65 73 20 6e |utkey()}| takes n|
|000044b0| 6f 0d 0a 61 72 67 75 6d | 65 6e 74 73 2e 20 20 57 |o..argum|ents. W|
|000044c0| 68 65 6e 20 63 61 6c 6c | 65 64 2c 20 74 68 65 20 |hen call|ed, the |
|000044d0| 66 75 6e 63 74 69 6f 6e | 20 66 69 72 73 74 20 66 |function| first f|
|000044e0| 6c 75 73 68 65 73 20 61 | 6e 79 20 70 65 6e 64 69 |lushes a|ny pendi|
|000044f0| 6e 67 20 6f 75 74 70 75 | 74 0d 0a 74 65 78 74 2c |ng outpu|t..text,|
|00004500| 20 74 68 65 6e 20 70 61 | 75 73 65 73 20 74 68 65 | then pa|uses the|
|00004510| 20 67 61 6d 65 20 75 6e | 74 69 6c 20 74 68 65 20 | game un|til the |
|00004520| 70 6c 61 79 65 72 20 68 | 69 74 73 20 61 20 6b 65 |player h|its a ke|
|00004530| 79 2e 20 20 4f 6e 63 65 | 20 61 20 6b 65 79 0d 0a |y. Once| a key..|
|00004540| 69 73 20 68 69 74 2c 20 | 61 20 73 74 72 69 6e 67 |is hit, |a string|
|00004550| 20 63 6f 6e 74 61 69 6e | 69 6e 67 20 74 68 65 20 | contain|ing the |
|00004560| 63 68 61 72 61 63 74 65 | 72 20 69 73 20 72 65 74 |characte|r is ret|
|00004570| 75 72 6e 65 64 2e 20 20 | 4e 6f 74 65 20 74 68 61 |urned. |Note tha|
|00004580| 74 20 74 68 69 73 0d 0a | 66 75 6e 63 74 69 6f 6e |t this..|function|
|00004590| 20 64 6f 65 73 20 7b 5c | 69 74 20 6e 6f 74 7d 20 | does {\|it not} |
|000045a0| 70 72 6f 76 69 64 65 20 | 61 20 70 6f 72 74 61 62 |provide |a portab|
|000045b0| 6c 65 20 6d 65 63 68 61 | 6e 69 73 6d 20 66 6f 72 |le mecha|nism for|
|000045c0| 20 72 65 61 64 69 6e 67 | 0d 0a 6e 6f 6e 2d 73 74 | reading|..non-st|
|000045d0| 61 6e 64 61 72 64 69 7a | 65 64 20 6b 65 79 73 2c |andardiz|ed keys,|
|000045e0| 20 73 75 63 68 20 61 73 | 20 63 75 72 73 6f 72 20 | such as| cursor |
|000045f0| 61 72 72 6f 77 20 6b 65 | 79 73 20 61 6e 64 20 66 |arrow ke|ys and f|
|00004600| 75 6e 63 74 69 6f 6e 20 | 6b 65 79 73 2e 0d 0a 49 |unction |keys...I|
|00004610| 66 20 74 68 65 20 75 73 | 65 72 20 75 73 65 73 20 |f the us|er uses |
|00004620| 61 20 6e 6f 6e 2d 73 74 | 61 6e 64 61 72 64 20 6b |a non-st|andard k|
|00004630| 65 79 2c 20 74 68 65 20 | 72 65 74 75 72 6e 20 76 |ey, the |return v|
|00004640| 61 6c 75 65 20 69 73 20 | 74 68 65 20 72 65 70 72 |alue is |the repr|
|00004650| 65 73 65 6e 74 61 74 69 | 6f 6e 0d 0a 6f 66 20 74 |esentati|on..of t|
|00004660| 68 65 20 6b 65 79 20 75 | 73 65 64 20 62 79 20 74 |he key u|sed by t|
|00004670| 68 65 20 63 6f 6d 70 75 | 74 65 72 20 62 65 69 6e |he compu|ter bein|
|00004680| 67 20 75 73 65 64 2e 20 | 20 54 6f 20 65 6e 73 75 |g used. | To ensu|
|00004690| 72 65 20 70 6f 72 74 61 | 62 69 6c 69 74 79 2c 0d |re porta|bility,.|
|000046a0| 0a 79 6f 75 20 73 68 6f | 75 6c 64 20 75 73 65 20 |.you sho|uld use |
|000046b0| 7b 5c 74 74 20 69 6e 70 | 75 74 6b 65 79 28 29 7d |{\tt inp|utkey()}|
|000046c0| 20 6f 6e 6c 79 20 77 69 | 74 68 20 73 74 61 6e 64 | only wi|th stand|
|000046d0| 61 72 64 69 7a 65 64 20 | 6b 65 79 73 20 28 61 6c |ardized |keys (al|
|000046e0| 70 68 61 62 65 74 69 63 | 2c 0d 0a 6e 75 6d 65 72 |phabetic|,..numer|
|000046f0| 69 63 2c 20 61 6e 64 20 | 70 75 6e 63 74 75 61 74 |ic, and |punctuat|
|00004700| 69 6f 6e 20 6b 65 79 73 | 29 2e 20 20 4e 6f 74 65 |ion keys|). Note|
|00004710| 20 74 68 61 74 20 79 6f | 75 20 77 69 6c 6c 20 65 | that yo|u will e|
|00004720| 6e 63 6f 75 6e 74 65 72 | 20 6e 6f 0d 0a 70 6f 72 |ncounter| no..por|
|00004730| 74 61 62 69 6c 69 74 79 | 20 70 72 6f 62 6c 65 6d |tability| problem|
|00004740| 73 20 69 66 20 79 6f 75 | 20 73 69 6d 70 6c 79 20 |s if you| simply |
|00004750| 69 67 6e 6f 72 65 20 74 | 68 65 20 72 65 74 75 72 |ignore t|he retur|
|00004760| 6e 20 76 61 6c 75 65 20 | 61 6e 64 20 75 73 65 0d |n value |and use.|
|00004770| 0a 7b 5c 74 74 20 69 6e | 70 75 74 6b 65 79 7d 20 |.{\tt in|putkey} |
|00004780| 6f 6e 6c 79 20 74 6f 20 | 70 61 75 73 65 20 61 6e |only to |pause an|
|00004790| 64 20 77 61 69 74 20 66 | 6f 72 20 61 20 6b 65 79 |d wait f|or a key|
|000047a0| 2e 0d 0a 0d 0a 5c 62 69 | 66 7b 69 6e 74 65 72 73 |.....\bi|f{inters|
|000047b0| 65 63 74 28 7b 5c 69 74 | 20 6c 69 73 74 31 2c 20 |ect({\it| list1, |
|000047c0| 6c 69 73 74 32 7d 29 7d | 52 65 74 75 72 6e 73 20 |list2})}|Returns |
|000047d0| 74 68 65 20 69 6e 74 65 | 72 73 65 63 74 69 6f 6e |the inte|rsection|
|000047e0| 20 6f 66 20 74 77 6f 20 | 6c 69 73 74 73 2d 2d 2d | of two |lists---|
|000047f0| 74 68 61 74 0d 0a 69 73 | 2c 20 74 68 65 20 6c 69 |that..is|, the li|
|00004800| 73 74 20 6f 66 20 69 74 | 65 6d 73 20 69 6e 20 62 |st of it|ems in b|
|00004810| 6f 74 68 20 6f 66 20 74 | 68 65 20 74 77 6f 20 6c |oth of t|he two l|
|00004820| 69 73 74 73 20 70 72 6f | 76 69 64 65 64 20 61 73 |ists pro|vided as|
|00004830| 20 61 72 67 75 6d 65 6e | 74 73 2e 0d 0a 46 6f 72 | argumen|ts...For|
|00004840| 20 65 78 61 6d 70 6c 65 | 3a 0d 0a 0d 0a 7b 5c 65 | example|:....{\e|
|00004850| 78 61 6d 70 6c 65 0d 0a | 69 6e 74 65 72 73 65 63 |xample..|intersec|
|00004860| 74 28 5b 31 20 32 20 33 | 20 34 20 35 20 36 5d 2c |t([1 2 3| 4 5 6],|
|00004870| 20 5b 32 20 34 20 36 20 | 38 20 31 30 5d 29 0d 0a | [2 4 6 |8 10])..|
|00004880| 7d 5c 6d 65 64 73 6b 69 | 70 5c 6e 6f 69 6e 64 65 |}\medski|p\noinde|
|00004890| 6e 74 0d 0a 79 69 65 6c | 64 73 3a 0d 0a 7b 5c 65 |nt..yiel|ds:..{\e|
|000048a0| 78 61 6d 70 6c 65 0d 0a | 5b 32 20 34 20 36 5d 0d |xample..|[2 4 6].|
|000048b0| 0a 7d 5c 6d 65 64 73 6b | 69 70 0d 0a 0d 0a 4e 6f |.}\medsk|ip....No|
|000048c0| 74 65 20 74 68 61 74 20 | 74 68 65 20 62 65 68 61 |te that |the beha|
|000048d0| 76 69 6f 72 20 66 6f 72 | 20 6c 69 73 74 73 20 77 |vior for| lists w|
|000048e0| 69 74 68 20 72 65 70 65 | 61 74 65 64 20 69 74 65 |ith repe|ated ite|
|000048f0| 6d 73 20 69 73 20 6e 6f | 74 20 66 75 6c 6c 79 20 |ms is no|t fully |
|00004900| 64 65 66 69 6e 65 64 0d | 0a 77 69 74 68 20 72 65 |defined.|.with re|
|00004910| 73 70 65 63 74 20 74 6f | 20 74 68 65 20 6e 75 6d |spect to| the num|
|00004920| 62 65 72 20 6f 66 20 65 | 61 63 68 20 72 65 70 65 |ber of e|ach repe|
|00004930| 61 74 65 64 20 69 74 65 | 6d 20 74 68 61 74 20 77 |ated ite|m that w|
|00004940| 69 6c 6c 20 61 70 70 65 | 61 72 20 69 6e 20 74 68 |ill appe|ar in th|
|00004950| 65 0d 0a 72 65 73 75 6c | 74 20 6c 69 73 74 2e 20 |e..resul|t list. |
|00004960| 20 49 6e 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 | In the |current |
|00004970| 69 6d 70 6c 65 6d 65 6e | 74 61 74 69 6f 6e 2c 20 |implemen|tation, |
|00004980| 74 68 65 20 6e 75 6d 62 | 65 72 20 6f 66 20 72 65 |the numb|er of re|
|00004990| 70 65 61 74 65 64 20 69 | 74 65 6d 73 0d 0a 74 68 |peated i|tems..th|
|000049a0| 61 74 20 69 73 20 70 72 | 65 73 65 6e 74 20 69 6e |at is pr|esent in|
|000049b0| 20 74 68 65 20 7b 5c 69 | 74 20 73 68 6f 72 74 65 | the {\i|t shorte|
|000049c0| 72 7d 20 6f 66 20 74 68 | 65 20 74 77 6f 20 73 6f |r} of th|e two so|
|000049d0| 75 72 63 65 20 6c 69 73 | 74 73 20 77 69 6c 6c 20 |urce lis|ts will |
|000049e0| 62 65 0d 0a 74 68 65 20 | 6e 75 6d 62 65 72 20 74 |be..the |number t|
|000049f0| 68 61 74 20 61 70 70 65 | 61 72 73 20 69 6e 20 74 |hat appe|ars in t|
|00004a00| 68 65 20 72 65 73 75 6c | 74 20 6c 69 73 74 3b 20 |he resul|t list; |
|00004a10| 68 6f 77 65 76 65 72 2c | 20 74 68 69 73 20 62 65 |however,| this be|
|00004a20| 68 61 76 69 6f 72 20 6d | 61 79 0d 0a 63 68 61 6e |havior m|ay..chan|
|00004a30| 67 65 20 69 6e 20 66 75 | 74 75 72 65 20 76 65 72 |ge in fu|ture ver|
|00004a40| 73 69 6f 6e 73 2e 0d 0a | 0d 0a 5c 62 69 66 7b 6f |sions...|..\bif{o|
|00004a50| 62 6a 77 6f 72 64 73 28 | 7b 5c 69 74 20 6e 75 6d |bjwords(|{\it num|
|00004a60| 7d 29 7d 50 72 6f 76 69 | 64 65 73 20 61 20 6c 69 |})}Provi|des a li|
|00004a70| 73 74 20 6f 66 20 74 68 | 65 20 61 63 74 75 61 6c |st of th|e actual|
|00004a80| 20 77 6f 72 64 73 20 74 | 68 65 20 75 73 65 72 20 | words t|he user |
|00004a90| 74 79 70 65 64 0d 0a 74 | 6f 20 72 65 66 65 72 20 |typed..t|o refer |
|00004aa0| 74 6f 20 61 6e 20 6f 62 | 6a 65 63 74 20 75 73 65 |to an ob|ject use|
|00004ab0| 64 20 69 6e 20 74 68 65 | 20 63 75 72 72 65 6e 74 |d in the| current|
|00004ac0| 20 63 6f 6d 6d 61 6e 64 | 2e 20 20 54 68 65 20 61 | command|. The a|
|00004ad0| 72 67 75 6d 65 6e 74 0d | 0a 7b 5c 69 74 20 6e 75 |rgument.|.{\it nu|
|00004ae0| 6d 7d 20 73 70 65 63 69 | 66 69 65 73 20 77 68 69 |m} speci|fies whi|
|00004af0| 63 68 20 6f 62 6a 65 63 | 74 20 79 6f 75 27 72 65 |ch objec|t you're|
|00004b00| 20 69 6e 74 65 72 65 73 | 74 65 64 20 69 6e 3a 20 | interes|ted in: |
|00004b10| 20 31 20 66 6f 72 20 74 | 68 65 0d 0a 64 69 72 65 | 1 for t|he..dire|
|00004b20| 63 74 20 6f 62 6a 65 63 | 74 2c 20 6f 72 20 32 20 |ct objec|t, or 2 |
|00004b30| 66 6f 72 20 74 68 65 20 | 69 6e 64 69 72 65 63 74 |for the |indirect|
|00004b40| 20 6f 62 6a 65 63 74 2e | 20 20 54 68 65 20 72 65 | object.| The re|
|00004b50| 74 75 72 6e 20 76 61 6c | 75 65 20 69 73 0d 0a 61 |turn val|ue is..a|
|00004b60| 20 6c 69 73 74 20 6f 66 | 20 73 74 72 69 6e 67 73 | list of| strings|
|00004b70| 3b 20 74 68 65 20 73 74 | 72 69 6e 67 73 20 61 72 |; the st|rings ar|
|00004b80| 65 20 74 68 65 20 77 6f | 72 64 73 20 75 73 65 64 |e the wo|rds used|
|00004b90| 20 69 6e 20 74 68 65 20 | 63 6f 6d 6d 61 6e 64 0d | in the |command.|
|00004ba0| 0a 28 63 6f 6e 76 65 72 | 74 65 64 20 74 6f 20 6c |.(conver|ted to l|
|00004bb0| 6f 77 65 72 20 63 61 73 | 65 2c 20 73 74 72 69 70 |ower cas|e, strip|
|00004bc0| 70 65 64 20 6f 66 20 61 | 6e 79 20 73 70 61 63 65 |ped of a|ny space|
|00004bd0| 73 20 6f 72 20 70 75 6e | 63 74 75 61 74 69 6f 6e |s or pun|ctuation|
|00004be0| 29 2e 0d 0a 49 66 20 61 | 20 73 70 65 63 69 61 6c |)...If a| special|
|00004bf0| 20 77 6f 72 64 20 73 75 | 63 68 20 61 73 20 60 60 | word su|ch as ``|
|00004c00| 69 74 2c 27 27 20 60 60 | 74 68 65 6d 2c 27 27 20 |it,'' ``|them,'' |
|00004c10| 6f 72 20 60 60 61 6c 6c | 27 27 20 77 61 73 20 75 |or ``all|'' was u|
|00004c20| 73 65 64 0d 0a 74 6f 20 | 73 70 65 63 69 66 79 20 |sed..to |specify |
|00004c30| 74 68 65 20 6f 62 6a 65 | 63 74 2c 20 74 68 65 20 |the obje|ct, the |
|00004c40| 6c 69 73 74 20 77 69 6c | 6c 20 68 61 76 65 20 61 |list wil|l have a|
|00004c50| 20 73 69 6e 67 6c 65 20 | 65 6c 65 6d 65 6e 74 2c | single |element,|
|00004c60| 20 77 68 69 63 68 0d 0a | 69 73 20 74 68 65 20 73 | which..|is the s|
|00004c70| 70 65 63 69 61 6c 20 77 | 6f 72 64 20 75 73 65 64 |pecial w|ord used|
|00004c80| 2e 0d 0a 0d 0a 49 66 20 | 74 68 65 20 70 6c 61 79 |.....If |the play|
|00004c90| 65 72 20 74 79 70 65 73 | 20 60 60 74 61 6b 65 20 |er types| ``take |
|00004ca0| 61 6c 6c 2c 27 27 20 74 | 68 65 6e 20 7b 5c 74 74 |all,'' t|hen {\tt|
|00004cb0| 20 6f 62 6a 77 6f 72 64 | 73 28 31 29 7d 20 77 69 | objword|s(1)} wi|
|00004cc0| 6c 6c 0d 0a 72 65 74 75 | 72 6e 20 7b 5c 74 74 20 |ll..retu|rn {\tt |
|00004cd0| 5b 27 61 6c 6c 27 5d 7d | 20 61 6e 64 20 7b 5c 74 |['all']}| and {\t|
|00004ce0| 74 20 6f 62 6a 77 6f 72 | 64 73 28 32 29 7d 20 77 |t objwor|ds(2)} w|
|00004cf0| 69 6c 6c 20 72 65 74 75 | 72 6e 20 7b 5c 74 74 20 |ill retu|rn {\tt |
|00004d00| 5b 5d 7d 2e 0d 0a 0d 0a | 49 66 20 74 68 65 20 70 |[]}.....|If the p|
|00004d10| 6c 61 79 65 72 20 74 79 | 70 65 73 20 60 60 70 75 |layer ty|pes ``pu|
|00004d20| 74 20 61 6c 6c 20 69 6e | 20 72 65 64 20 62 6f 78 |t all in| red box|
|00004d30| 2c 27 27 20 74 68 65 6e | 20 7b 5c 74 74 20 6f 62 |,'' then| {\tt ob|
|00004d40| 6a 77 6f 72 64 73 28 31 | 29 7d 0d 0a 77 69 6c 6c |jwords(1|)}..will|
|00004d50| 20 72 65 74 75 72 6e 20 | 7b 5c 74 74 20 5b 27 61 | return |{\tt ['a|
|00004d60| 6c 6c 27 5d 7d 20 61 6e | 64 20 7b 5c 74 74 20 6f |ll']} an|d {\tt o|
|00004d70| 62 6a 77 6f 72 64 73 28 | 32 29 7d 20 77 69 6c 6c |bjwords(|2)} will|
|00004d80| 20 72 65 74 75 72 6e 0d | 0a 7b 5c 74 74 20 5b 27 | return.|.{\tt ['|
|00004d90| 72 65 64 27 20 27 62 6f | 78 27 5d 7d 2e 0d 0a 0d |red' 'bo|x']}....|
|00004da0| 0a 49 66 20 6d 75 6c 74 | 69 70 6c 65 20 64 69 72 |.If mult|iple dir|
|00004db0| 65 63 74 20 6f 62 6a 65 | 63 74 73 20 61 72 65 20 |ect obje|cts are |
|00004dc0| 75 73 65 64 2c 20 74 68 | 65 20 66 75 6e 63 74 69 |used, th|e functi|
|00004dd0| 6f 6e 20 77 69 6c 6c 20 | 72 65 74 75 72 6e 20 74 |on will |return t|
|00004de0| 68 65 0d 0a 7b 5c 69 74 | 20 63 75 72 72 65 6e 74 |he..{\it| current|
|00004df0| 7d 20 6f 62 6a 65 63 74 | 27 73 20 77 6f 72 64 73 |} object|'s words|
|00004e00| 20 6f 6e 6c 79 2e 20 20 | 46 6f 72 20 65 78 61 6d | only. |For exam|
|00004e10| 70 6c 65 2c 20 69 66 20 | 74 68 65 20 70 6c 61 79 |ple, if |the play|
|00004e20| 65 72 0d 0a 74 79 70 65 | 73 20 60 60 70 75 74 20 |er..type|s ``put |
|00004e30| 62 6c 75 65 20 66 6f 6c | 64 65 72 20 61 6e 64 20 |blue fol|der and |
|00004e40| 67 72 65 65 6e 20 62 6f | 6f 6b 20 69 6e 20 72 65 |green bo|ok in re|
|00004e50| 64 20 62 6f 78 2c 27 27 | 20 7b 5c 74 74 20 6f 62 |d box,''| {\tt ob|
|00004e60| 6a 77 6f 72 64 73 28 31 | 29 7d 0d 0a 77 69 6c 6c |jwords(1|)}..will|
|00004e70| 20 72 65 74 75 72 6e 20 | 7b 5c 74 74 20 5b 27 62 | return |{\tt ['b|
|00004e80| 6c 75 65 27 20 27 66 6f | 6c 64 65 72 27 5d 7d 20 |lue' 'fo|lder']} |
|00004e90| 77 68 69 6c 65 20 74 68 | 65 20 66 69 72 73 74 20 |while th|e first |
|00004ea0| 64 69 72 65 63 74 20 6f | 62 6a 65 63 74 0d 0a 69 |direct o|bject..i|
|00004eb0| 73 20 62 65 69 6e 67 20 | 70 72 6f 63 65 73 73 65 |s being |processe|
|00004ec0| 64 2c 20 61 6e 64 20 7b | 5c 74 74 20 5b 27 67 72 |d, and {|\tt ['gr|
|00004ed0| 65 65 6e 27 20 27 62 6f | 6f 6b 27 5d 7d 20 77 68 |een' 'bo|ok']} wh|
|00004ee0| 69 6c 65 20 74 68 65 20 | 73 65 63 6f 6e 64 0d 0a |ile the |second..|
|00004ef0| 6f 62 6a 65 63 74 20 69 | 73 20 62 65 69 6e 67 20 |object i|s being |
|00004f00| 70 72 6f 63 65 73 73 65 | 64 2e 0d 0a 0d 0a 54 68 |processe|d.....Th|
|00004f10| 69 73 20 66 75 6e 63 74 | 69 6f 6e 20 63 6f 75 6c |is funct|ion coul|
|00004f20| 64 20 70 6f 74 65 6e 74 | 69 61 6c 6c 79 20 62 65 |d potent|ially be|
|00004f30| 20 75 73 65 66 75 6c 20 | 69 6e 20 73 75 63 68 20 | useful |in such |
|00004f40| 63 61 73 65 73 20 61 73 | 20 60 60 61 73 6b 20 61 |cases as| ``ask a|
|00004f50| 63 74 6f 72 0d 0a 61 62 | 6f 75 74 20 6f 62 6a 65 |ctor..ab|out obje|
|00004f60| 63 74 2c 27 27 20 62 65 | 63 61 75 73 65 20 69 74 |ct,'' be|cause it|
|00004f70| 20 61 6c 6c 6f 77 73 20 | 79 6f 75 20 64 65 74 65 | allows |you dete|
|00004f80| 72 6d 69 6e 65 20 6d 75 | 63 68 20 6d 6f 72 65 20 |rmine mu|ch more |
|00004f90| 70 72 65 63 69 73 65 6c | 79 0d 0a 77 68 61 74 20 |precisel|y..what |
|00004fa0| 74 68 65 20 70 6c 61 79 | 65 72 20 69 73 20 61 73 |the play|er is as|
|00004fb0| 6b 69 6e 67 20 61 62 6f | 75 74 20 74 68 61 6e 20 |king abo|ut than |
|00004fc0| 77 6f 75 6c 64 20 6f 74 | 68 65 72 77 69 73 65 20 |would ot|herwise |
|00004fd0| 62 65 20 70 6f 73 73 69 | 62 6c 65 2e 0d 0a 0d 0a |be possi|ble.....|
|00004fe0| 5c 62 69 66 7b 6f 75 74 | 68 69 64 65 28 7b 5c 69 |\bif{out|hide({\i|
|00004ff0| 74 20 66 6c 61 67 7d 29 | 7d 54 75 72 6e 73 20 68 |t flag})|}Turns h|
|00005000| 69 64 64 65 6e 20 6f 75 | 74 70 75 74 20 6f 6e 20 |idden ou|tput on |
|00005010| 6f 72 20 6f 66 66 2c 20 | 73 69 6d 75 6c 61 74 69 |or off, |simulati|
|00005020| 6e 67 20 74 68 65 0d 0a | 77 61 79 20 74 68 65 20 |ng the..|way the |
|00005030| 70 61 72 73 65 72 20 64 | 69 73 61 6d 62 69 67 75 |parser d|isambigu|
|00005040| 61 74 65 73 20 6f 62 6a | 65 63 74 73 2e 20 20 54 |ates obj|ects. T|
|00005050| 68 65 20 70 61 72 61 6d | 65 74 65 72 20 7b 5c 69 |he param|eter {\i|
|00005060| 74 20 66 6c 61 67 7d 20 | 69 73 0d 0a 65 69 74 68 |t flag} |is..eith|
|00005070| 65 72 20 7b 5c 74 74 20 | 74 72 75 65 7d 20 6f 72 |er {\tt |true} or|
|00005080| 20 7b 5c 74 74 20 6e 69 | 6c 7d 2e 20 20 57 68 65 | {\tt ni|l}. Whe|
|00005090| 6e 20 79 6f 75 20 63 61 | 6c 6c 20 7b 5c 74 74 20 |n you ca|ll {\tt |
|000050a0| 6f 75 74 68 69 64 65 28 | 74 72 75 65 29 7d 2c 0d |outhide(|true)},.|
|000050b0| 0a 74 68 65 20 73 79 73 | 74 65 6d 20 73 74 61 72 |.the sys|tem star|
|000050c0| 74 73 20 68 69 64 69 6e | 67 20 6f 75 74 70 75 74 |ts hidin|g output|
|000050d0| 2e 20 20 53 75 62 73 65 | 71 75 65 6e 74 20 6f 75 |. Subse|quent ou|
|000050e0| 74 70 75 74 20 69 73 20 | 73 75 70 70 72 65 73 73 |tput is |suppress|
|000050f0| 65 64 2d 2d 2d 69 74 0d | 0a 69 73 20 6e 6f 74 20 |ed---it.|.is not |
|00005100| 73 65 65 6e 20 62 79 20 | 74 68 65 20 70 6c 61 79 |seen by |the play|
|00005110| 65 72 2e 20 20 57 68 65 | 6e 20 79 6f 75 20 63 61 |er. Whe|n you ca|
|00005120| 6c 6c 20 7b 5c 74 74 20 | 6f 75 74 68 69 64 65 28 |ll {\tt |outhide(|
|00005130| 6e 69 6c 29 7d 2c 20 74 | 68 65 0d 0a 73 79 73 74 |nil)}, t|he..syst|
|00005140| 65 6d 20 73 74 6f 70 73 | 20 68 69 64 69 6e 67 20 |em stops| hiding |
|00005150| 6f 75 74 70 75 74 2d 2d | 2d 73 75 62 73 65 71 75 |output--|-subsequ|
|00005160| 65 6e 74 20 6f 75 74 70 | 75 74 20 69 73 20 6f 6e |ent outp|ut is on|
|00005170| 63 65 20 61 67 61 69 6e | 20 64 69 73 70 6c 61 79 |ce again| display|
|00005180| 65 64 2e 0d 0a 7b 5c 74 | 74 20 6f 75 74 68 69 64 |ed...{\t|t outhid|
|00005190| 65 28 6e 69 6c 29 7d 20 | 61 6c 73 6f 20 72 65 74 |e(nil)} |also ret|
|000051a0| 75 72 6e 73 20 61 20 76 | 61 6c 75 65 20 69 6e 64 |urns a v|alue ind|
|000051b0| 69 63 61 74 69 6e 67 20 | 77 68 65 74 68 65 72 20 |icating |whether |
|000051c0| 61 6e 79 20 28 73 75 70 | 70 72 65 73 73 65 64 29 |any (sup|pressed)|
|000051d0| 0d 0a 6f 75 74 70 75 74 | 20 77 61 73 20 67 65 6e |..output| was gen|
|000051e0| 65 72 61 74 65 64 20 73 | 69 6e 63 65 20 74 68 65 |erated s|ince the|
|000051f0| 20 63 61 6c 6c 20 74 6f | 20 7b 5c 74 74 20 6f 75 | call to| {\tt ou|
|00005200| 74 68 69 64 65 28 74 72 | 75 65 29 7d 2c 20 77 68 |thide(tr|ue)}, wh|
|00005210| 69 63 68 20 61 6c 6c 6f | 77 73 0d 0a 79 6f 75 20 |ich allo|ws..you |
|00005220| 74 6f 20 64 65 74 65 72 | 6d 69 6e 65 20 77 68 65 |to deter|mine whe|
|00005230| 74 68 65 72 20 61 6e 79 | 20 6f 75 74 70 75 74 20 |ther any| output |
|00005240| 7b 5c 69 74 20 77 6f 75 | 6c 64 20 68 61 76 65 7d |{\it wou|ld have}|
|00005250| 20 72 65 73 75 6c 74 65 | 64 20 66 72 6f 6d 20 74 | resulte|d from t|
|00005260| 68 65 0d 0a 63 61 6c 6c | 73 20 6d 61 64 65 20 62 |he..call|s made b|
|00005270| 65 74 77 65 65 6e 20 7b | 5c 74 74 20 6f 75 74 68 |etween {|\tt outh|
|00005280| 69 64 65 28 74 72 75 65 | 29 7d 20 61 6e 64 20 7b |ide(true|)} and {|
|00005290| 5c 74 74 20 6f 75 74 68 | 69 64 65 28 6e 69 6c 29 |\tt outh|ide(nil)|
|000052a0| 7d 2e 0d 0a 0d 0a 54 68 | 69 73 20 69 73 20 74 68 |}.....Th|is is th|
|000052b0| 65 20 73 61 6d 65 20 6d | 65 63 68 61 6e 69 73 6d |e same m|echanism|
|000052c0| 20 75 73 65 64 20 62 79 | 20 74 68 65 20 70 61 72 | used by| the par|
|000052d0| 73 65 72 20 64 75 72 69 | 6e 67 20 64 69 73 61 6d |ser duri|ng disam|
|000052e0| 62 69 67 75 61 74 69 6f | 6e 2c 0d 0a 73 6f 20 69 |biguatio|n,..so i|
|000052f0| 74 20 73 68 6f 75 6c 64 | 20 7b 5c 69 74 20 6e 6f |t should| {\it no|
|00005300| 74 7d 20 62 65 20 63 61 | 6c 6c 65 64 20 62 79 20 |t} be ca|lled by |
|00005310| 61 20 5c 76 65 72 44 6f | 56 65 72 62 5c 20 6f 72 |a \verDo|Verb\ or|
|00005320| 0d 0a 5c 76 65 72 49 6f | 56 65 72 62 5c 20 6d 65 |..\verIo|Verb\ me|
|00005330| 74 68 6f 64 2e 20 20 54 | 68 69 73 20 66 75 6e 63 |thod. T|his func|
|00005340| 74 69 6f 6e 20 69 73 20 | 70 72 6f 76 69 64 65 64 |tion is |provided|
|00005350| 20 74 6f 20 61 6c 6c 6f | 77 0d 0a 79 6f 75 20 74 | to allo|w..you t|
|00005360| 6f 20 6d 61 6b 65 20 63 | 61 6c 6c 73 20 74 6f 20 |o make c|alls to |
|00005370| 5c 76 65 72 44 6f 56 65 | 72 62 5c 20 61 6e 64 20 |\verDoVe|rb\ and |
|00005380| 5c 76 65 72 49 6f 56 65 | 72 62 5c 20 74 6f 0d 0a |\verIoVe|rb\ to..|
|00005390| 64 65 74 65 72 6d 69 6e | 65 20 69 66 20 74 68 65 |determin|e if the|
|000053a0| 79 20 77 69 6c 6c 20 61 | 6c 6c 6f 77 20 61 20 70 |y will a|llow a p|
|000053b0| 61 72 74 69 63 75 6c 61 | 72 20 76 65 72 62 20 77 |articula|r verb w|
|000053c0| 69 74 68 20 61 6e 20 6f | 62 6a 65 63 74 2e 0d 0a |ith an o|bject...|
|000053d0| 0d 0a 54 68 65 72 65 20 | 69 73 20 6e 6f 20 77 61 |..There |is no wa|
|000053e0| 79 20 74 6f 20 72 65 63 | 6f 76 65 72 20 74 68 65 |y to rec|over the|
|000053f0| 20 74 65 78 74 20 67 65 | 6e 65 72 61 74 65 64 20 | text ge|nerated |
|00005400| 77 68 69 6c 65 20 6f 75 | 74 70 75 74 20 69 73 20 |while ou|tput is |
|00005410| 62 65 69 6e 67 0d 0a 68 | 69 64 64 65 6e 2e 20 20 |being..h|idden. |
|00005420| 54 68 65 20 6f 6e 6c 79 | 20 69 6e 66 6f 72 6d 61 |The only| informa|
|00005430| 74 69 6f 6e 20 61 76 61 | 69 6c 61 62 6c 65 20 69 |tion ava|ilable i|
|00005440| 73 20 77 68 65 74 68 65 | 72 20 61 6e 79 20 74 65 |s whethe|r any te|
|00005450| 78 74 20 77 61 73 0d 0a | 67 65 6e 65 72 61 74 65 |xt was..|generate|
|00005460| 64 2e 0d 0a 0d 0a 5c 62 | 69 66 7b 72 65 73 74 61 |d.....\b|if{resta|
|00005470| 72 74 28 7b 5c 69 74 20 | 66 75 6e 63 70 74 72 2c |rt({\it |funcptr,|
|00005480| 20 70 61 72 61 6d 7d 29 | 7d 54 68 69 73 20 6e 65 | param})|}This ne|
|00005490| 77 20 66 6f 72 6d 20 6f | 66 20 7b 5c 74 74 20 72 |w form o|f {\tt r|
|000054a0| 65 73 74 61 72 74 28 29 | 7d 20 61 6c 6c 6f 77 73 |estart()|} allows|
|000054b0| 0d 0a 79 6f 75 20 74 6f | 20 73 70 65 63 69 66 79 |..you to| specify|
|000054c0| 20 61 20 66 75 6e 63 74 | 69 6f 6e 20 74 6f 20 62 | a funct|ion to b|
|000054d0| 65 20 63 61 6c 6c 65 64 | 20 61 66 74 65 72 20 72 |e called| after r|
|000054e0| 65 73 74 61 72 74 69 6e | 67 20 74 68 65 20 67 61 |estartin|g the ga|
|000054f0| 6d 65 2c 0d 0a 62 75 74 | 20 62 65 66 6f 72 65 20 |me,..but| before |
|00005500| 74 68 65 20 7b 5c 74 74 | 20 69 6e 69 74 28 29 7d |the {\tt| init()}|
|00005510| 20 66 75 6e 63 74 69 6f | 6e 20 69 73 20 69 6e 76 | functio|n is inv|
|00005520| 6f 6b 65 64 2e 20 20 54 | 68 69 73 20 6e 65 77 20 |oked. T|his new |
|00005530| 66 65 61 74 75 72 65 0d | 0a 68 61 73 20 62 65 65 |feature.|.has bee|
|00005540| 6e 20 61 64 64 65 64 20 | 62 65 63 61 75 73 65 20 |n added |because |
|00005550| 69 74 20 77 6f 75 6c 64 | 20 6f 74 68 65 72 77 69 |it would| otherwi|
|00005560| 73 65 20 62 65 20 69 6d | 70 6f 73 73 69 62 6c 65 |se be im|possible|
|00005570| 20 74 6f 20 70 61 73 73 | 0d 0a 61 6e 79 20 69 6e | to pass|..any in|
|00005580| 66 6f 72 6d 61 74 69 6f | 6e 20 61 63 72 6f 73 73 |formatio|n across|
|00005590| 20 61 20 72 65 73 74 61 | 72 74 20 6f 70 65 72 61 | a resta|rt opera|
|000055a0| 74 69 6f 6e 3a 20 20 74 | 68 65 20 7b 5c 74 74 20 |tion: t|he {\tt |
|000055b0| 72 65 73 74 61 72 74 28 | 29 7d 20 0d 0a 66 75 6e |restart(|)} ..fun|
|000055c0| 63 74 69 6f 6e 20 64 6f | 65 73 20 6e 6f 74 20 72 |ction do|es not r|
|000055d0| 65 74 75 72 6e 2c 20 61 | 6e 64 20 61 6c 6c 20 67 |eturn, a|nd all g|
|000055e0| 61 6d 65 20 73 74 61 74 | 65 20 69 73 20 72 65 73 |ame stat|e is res|
|000055f0| 65 74 20 74 6f 20 69 74 | 73 20 69 6e 69 74 69 61 |et to it|s initia|
|00005600| 6c 0d 0a 73 74 61 74 65 | 20 62 79 20 7b 5c 74 74 |l..state| by {\tt|
|00005610| 20 72 65 73 74 61 72 74 | 28 29 7d 2e 20 20 59 6f | restart|()}. Yo|
|00005620| 75 20 63 61 6e 20 75 73 | 65 20 74 68 69 73 20 66 |u can us|e this f|
|00005630| 75 6e 63 74 69 6f 6e 20 | 69 66 20 79 6f 75 20 77 |unction |if you w|
|00005640| 61 6e 74 0d 0a 61 20 72 | 65 73 74 61 72 74 65 64 |ant..a r|estarted|
|00005650| 20 67 61 6d 65 20 74 6f | 20 68 61 76 65 20 64 69 | game to| have di|
|00005660| 66 66 65 72 65 6e 74 20 | 73 74 61 72 74 75 70 20 |fferent |startup |
|00005670| 62 65 68 61 76 69 6f 72 | 20 74 68 61 6e 20 74 68 |behavior| than th|
|00005680| 65 20 67 61 6d 65 0d 0a | 68 61 73 20 77 68 65 6e |e game..|has when|
|00005690| 20 69 74 27 73 20 66 69 | 72 73 74 20 73 74 61 72 | it's fi|rst star|
|000056a0| 74 65 64 2e 20 20 4e 6f | 74 65 20 74 68 61 74 20 |ted. No|te that |
|000056b0| 7b 5c 74 74 20 61 64 76 | 2e 74 7d 20 70 61 73 73 |{\tt adv|.t} pass|
|000056c0| 65 73 20 61 20 70 6f 69 | 6e 74 65 72 0d 0a 74 6f |es a poi|nter..to|
|000056d0| 20 74 68 65 20 7b 5c 74 | 74 20 69 6e 69 74 52 65 | the {\t|t initRe|
|000056e0| 73 74 61 72 74 7d 20 66 | 75 6e 63 74 69 6f 6e 20 |start} f|unction |
|000056f0| 28 64 65 66 69 6e 65 64 | 20 69 6e 20 7b 5c 74 74 |(defined| in {\tt|
|00005700| 20 61 64 76 2e 74 7d 20 | 77 68 65 6e 20 69 74 0d | adv.t} |when it.|
|00005710| 0a 69 6e 76 6f 6b 65 73 | 20 7b 5c 74 74 20 72 65 |.invokes| {\tt re|
|00005720| 73 74 61 72 74 28 29 7d | 20 69 6e 20 72 65 73 70 |start()}| in resp|
|00005730| 6f 6e 73 65 20 74 6f 20 | 61 20 60 60 72 65 73 74 |onse to |a ``rest|
|00005740| 61 72 74 27 27 20 63 6f | 6d 6d 61 6e 64 3b 20 74 |art'' co|mmand; t|
|00005750| 68 65 0d 0a 7b 5c 74 74 | 20 61 64 76 2e 74 7d 20 |he..{\tt| adv.t} |
|00005760| 69 6d 70 6c 65 6d 65 6e | 74 61 74 69 6f 6e 20 6f |implemen|tation o|
|00005770| 66 20 7b 5c 74 74 20 69 | 6e 69 74 52 65 73 74 61 |f {\tt i|nitResta|
|00005780| 72 74 28 29 7d 20 73 69 | 6d 70 6c 79 20 73 65 74 |rt()} si|mply set|
|00005790| 73 20 74 68 65 0d 0a 66 | 6c 61 67 20 7b 5c 74 74 |s the..f|lag {\tt|
|000057a0| 20 67 6c 6f 62 61 6c 2e | 72 65 73 74 61 72 74 69 | global.|restarti|
|000057b0| 6e 67 7d 20 74 6f 20 7b | 5c 74 74 20 74 72 75 65 |ng} to {|\tt true|
|000057c0| 7d 20 74 6f 20 69 6e 64 | 69 63 61 74 65 20 74 68 |} to ind|icate th|
|000057d0| 61 74 20 74 68 65 0d 0a | 67 61 6d 65 20 69 73 20 |at the..|game is |
|000057e0| 62 65 69 6e 67 20 72 65 | 73 74 61 72 74 65 64 20 |being re|started |
|000057f0| 72 61 74 68 65 72 20 74 | 68 61 6e 20 66 69 72 73 |rather t|han firs|
|00005800| 74 20 65 6e 74 65 72 65 | 64 2e 0d 0a 0d 0a 54 68 |t entere|d.....Th|
|00005810| 65 20 7b 5c 69 74 20 70 | 61 72 61 6d 7d 0d 0a 76 |e {\it p|aram}..v|
|00005820| 61 6c 75 65 20 69 73 20 | 73 69 6d 70 6c 79 20 70 |alue is |simply p|
|00005830| 61 73 73 65 64 20 61 73 | 20 74 68 65 20 70 61 72 |assed as| the par|
|00005840| 61 6d 65 74 65 72 20 74 | 6f 20 74 68 65 20 66 75 |ameter t|o the fu|
|00005850| 6e 63 74 69 6f 6e 20 74 | 6f 20 62 65 20 63 61 6c |nction t|o be cal|
|00005860| 6c 65 64 3b 0d 0a 74 68 | 69 73 20 61 6c 6c 6f 77 |led;..th|is allow|
|00005870| 73 20 79 6f 75 20 74 6f | 20 70 61 73 73 20 69 6e |s you to| pass in|
|00005880| 66 6f 72 6d 61 74 69 6f | 6e 20 74 68 72 6f 75 67 |formatio|n throug|
|00005890| 68 20 74 68 65 20 72 65 | 73 65 74 2e 20 20 46 6f |h the re|set. Fo|
|000058a0| 72 20 65 78 61 6d 70 6c | 65 2c 0d 0a 69 66 20 79 |r exampl|e,..if y|
|000058b0| 6f 75 20 73 74 61 72 74 | 20 74 68 65 20 67 61 6d |ou start| the gam|
|000058c0| 65 20 77 69 74 68 20 61 | 20 71 75 65 73 74 69 6f |e with a| questio|
|000058d0| 6e 6e 61 69 72 65 20 61 | 73 6b 69 6e 67 0d 0a 74 |nnaire a|sking..t|
|000058e0| 68 65 20 70 6c 61 79 65 | 72 27 73 20 6e 61 6d 65 |he playe|r's name|
|000058f0| 2c 20 73 65 78 2c 20 61 | 6e 64 20 61 67 65 2c 20 |, sex, a|nd age, |
|00005900| 79 6f 75 20 63 6f 75 6c | 64 20 70 61 73 73 20 61 |you coul|d pass a|
|00005910| 20 6c 69 73 74 20 63 6f | 6e 74 61 69 6e 69 6e 67 | list co|ntaining|
|00005920| 20 74 68 65 0d 0a 70 6c | 61 79 65 72 27 73 20 72 | the..pl|ayer's r|
|00005930| 65 73 70 6f 6e 73 65 73 | 20 74 6f 20 79 6f 75 72 |esponses| to your|
|00005940| 20 72 65 73 74 61 72 74 | 20 66 75 6e 63 74 69 6f | restart| functio|
|00005950| 6e 2c 20 61 6e 64 20 68 | 61 76 65 20 74 68 65 20 |n, and h|ave the |
|00005960| 72 65 73 74 61 72 74 20 | 66 75 6e 63 74 69 6f 6e |restart |function|
|00005970| 0d 0a 73 74 6f 72 65 20 | 74 68 65 20 69 6e 66 6f |..store |the info|
|00005980| 72 6d 61 74 69 6f 6e 20 | 77 69 74 68 6f 75 74 20 |rmation |without |
|00005990| 6d 61 6b 69 6e 67 20 74 | 68 65 20 70 6c 61 79 65 |making t|he playe|
|000059a0| 72 20 61 6e 73 77 65 72 | 20 74 68 65 20 71 75 65 |r answer| the que|
|000059b0| 73 74 69 6f 6e 6e 61 69 | 72 65 0d 0a 61 67 61 69 |stionnai|re..agai|
|000059c0| 6e 2e 20 20 54 68 65 20 | 63 61 6c 6c 20 74 6f 20 |n. The |call to |
|000059d0| 7b 5c 74 74 20 72 65 73 | 74 61 72 74 28 29 7d 20 |{\tt res|tart()} |
|000059e0| 69 6e 20 7b 5c 74 74 20 | 61 64 76 2e 74 7d 20 75 |in {\tt |adv.t} u|
|000059f0| 73 65 73 0d 0a 7b 5c 74 | 74 20 67 6c 6f 62 61 6c |ses..{\t|t global|
|00005a00| 2e 69 6e 69 74 52 65 73 | 74 61 72 74 50 61 72 61 |.initRes|tartPara|
|00005a10| 6d 7d 20 61 73 20 74 68 | 65 20 70 61 72 61 6d 65 |m} as th|e parame|
|00005a20| 74 65 72 20 66 6f 72 20 | 74 68 65 20 7b 5c 74 74 |ter for |the {\tt|
|00005a30| 20 69 6e 69 74 52 65 73 | 74 61 72 74 28 29 7d 0d | initRes|tart()}.|
|00005a40| 0a 66 75 6e 63 74 69 6f | 6e 3b 20 73 6f 2c 20 69 |.functio|n; so, i|
|00005a50| 66 20 79 6f 75 20 70 72 | 6f 76 69 64 65 20 79 6f |f you pr|ovide yo|
|00005a60| 75 72 20 6f 77 6e 20 76 | 65 72 73 69 6f 6e 20 6f |ur own v|ersion o|
|00005a70| 66 20 7b 5c 74 74 20 69 | 6e 69 74 52 65 73 74 61 |f {\tt i|nitResta|
|00005a80| 72 74 28 29 7d 0d 0a 74 | 68 61 74 20 6d 61 6b 65 |rt()}..t|hat make|
|00005a90| 73 20 75 73 65 20 6f 66 | 20 74 68 65 20 70 61 72 |s use of| the par|
|00005aa0| 61 6d 65 74 65 72 20 69 | 6e 66 6f 72 6d 61 74 69 |ameter i|nformati|
|00005ab0| 6f 6e 2c 20 79 6f 75 20 | 63 61 6e 20 73 69 6d 70 |on, you |can simp|
|00005ac0| 6c 79 20 73 74 6f 72 65 | 0d 0a 74 68 65 20 6e 65 |ly store|..the ne|
|00005ad0| 63 65 73 73 61 72 79 20 | 69 6e 66 6f 72 6d 61 74 |cessary |informat|
|00005ae0| 69 6f 6e 20 69 6e 20 7b | 5c 74 74 20 67 6c 6f 62 |ion in {|\tt glob|
|00005af0| 61 6c 2e 69 6e 69 74 52 | 65 73 74 61 72 74 50 61 |al.initR|estartPa|
|00005b00| 72 61 6d 7d 20 74 6f 20 | 65 6e 73 75 72 65 0d 0a |ram} to |ensure..|
|00005b10| 74 68 61 74 20 69 74 27 | 73 20 70 61 73 73 65 64 |that it'|s passed|
|00005b20| 20 74 6f 20 79 6f 75 72 | 20 66 75 6e 63 74 69 6f | to your| functio|
|00005b30| 6e 20 61 74 20 74 68 65 | 20 61 70 70 72 6f 70 72 |n at the| appropr|
|00005b40| 69 61 74 65 20 74 69 6d | 65 2e 0d 0a 0d 0a 5c 62 |iate tim|e.....\b|
|00005b50| 69 66 7b 72 65 73 74 6f | 72 65 28 6e 69 6c 29 7d |if{resto|re(nil)}|
|00005b60| 54 68 69 73 20 73 70 65 | 63 69 61 6c 20 6e 65 77 |This spe|cial new|
|00005b70| 20 66 6f 72 6d 20 6f 66 | 20 74 68 65 20 7b 5c 74 | form of| the {\t|
|00005b80| 74 20 72 65 73 74 6f 72 | 65 28 29 7d 20 66 75 6e |t restor|e()} fun|
|00005b90| 63 74 69 6f 6e 0d 0a 61 | 6c 6c 6f 77 73 20 79 6f |ction..a|llows yo|
|00005ba0| 75 20 74 6f 20 63 68 6f | 6f 73 65 20 74 68 65 20 |u to cho|ose the |
|00005bb0| 74 69 6d 65 20 64 75 72 | 69 6e 67 20 73 74 61 72 |time dur|ing star|
|00005bc0| 74 75 70 20 74 68 61 74 | 20 74 68 65 20 70 6c 61 |tup that| the pla|
|00005bd0| 79 65 72 27 73 20 73 61 | 76 65 64 0d 0a 67 61 6d |yer's sa|ved..gam|
|00005be0| 65 20 69 73 20 72 65 73 | 74 6f 72 65 64 20 77 68 |e is res|tored wh|
|00005bf0| 65 6e 20 74 68 65 20 70 | 6c 61 79 65 72 20 73 74 |en the p|layer st|
|00005c00| 61 72 74 65 64 20 79 6f | 75 72 20 67 61 6d 65 20 |arted yo|ur game |
|00005c10| 77 69 74 68 20 61 20 73 | 61 76 65 64 20 67 61 6d |with a s|aved gam|
|00005c20| 65 0d 0a 61 6c 72 65 61 | 64 79 20 73 70 65 63 69 |e..alrea|dy speci|
|00005c30| 66 69 65 64 2e 20 20 57 | 68 65 6e 20 79 6f 75 20 |fied. W|hen you |
|00005c40| 63 61 6c 6c 20 7b 5c 74 | 74 20 72 65 73 74 6f 72 |call {\t|t restor|
|00005c50| 65 28 6e 69 6c 29 7d 2c | 20 74 68 65 20 73 79 73 |e(nil)},| the sys|
|00005c60| 74 65 6d 20 63 68 65 63 | 6b 73 0d 0a 74 6f 20 73 |tem chec|ks..to s|
|00005c70| 65 65 20 69 66 20 61 20 | 73 61 76 65 64 20 67 61 |ee if a |saved ga|
|00005c80| 6d 65 20 77 61 73 20 73 | 70 65 63 69 66 69 65 64 |me was s|pecified|
|00005c90| 20 62 79 20 74 68 65 20 | 70 6c 61 79 65 72 20 61 | by the |player a|
|00005ca0| 74 20 73 74 61 72 74 75 | 70 2c 20 61 6e 64 20 69 |t startu|p, and i|
|00005cb0| 66 0d 0a 73 6f 2c 20 69 | 6d 6d 65 64 69 61 74 65 |f..so, i|mmediate|
|00005cc0| 6c 79 20 72 65 73 74 6f | 72 65 73 20 74 68 65 20 |ly resto|res the |
|00005cd0| 67 61 6d 65 20 61 6e 64 | 20 72 65 74 75 72 6e 73 |game and| returns|
|00005ce0| 20 7b 5c 74 74 20 6e 69 | 6c 7d 2e 20 20 49 66 20 | {\tt ni|l}. If |
|00005cf0| 6e 6f 20 67 61 6d 65 0d | 0a 77 61 73 20 73 70 65 |no game.|.was spe|
|00005d00| 63 69 66 69 65 64 2c 20 | 74 68 65 20 66 75 6e 63 |cified, |the func|
|00005d10| 74 69 6f 6e 20 72 65 74 | 75 72 6e 73 20 7b 5c 74 |tion ret|urns {\t|
|00005d20| 74 20 74 72 75 65 7d 2e | 0d 0a 0d 0a 43 75 72 72 |t true}.|....Curr|
|00005d30| 65 6e 74 6c 79 2c 20 69 | 74 20 69 73 20 70 6f 73 |ently, i|t is pos|
|00005d40| 73 69 62 6c 65 20 66 6f | 72 20 61 20 70 6c 61 79 |sible fo|r a play|
|00005d50| 65 72 20 74 6f 20 73 74 | 61 72 74 0d 0a 61 20 67 |er to st|art..a g|
|00005d60| 61 6d 65 20 69 6e 20 74 | 68 69 73 20 6d 61 6e 6e |ame in t|his mann|
|00005d70| 65 72 20 6f 6e 6c 79 20 | 6f 6e 20 74 68 65 20 4d |er only |on the M|
|00005d80| 61 63 69 6e 74 6f 73 68 | 2c 20 62 75 74 20 74 68 |acintosh|, but th|
|00005d90| 65 20 6e 65 77 20 7b 5c | 74 74 20 72 65 73 74 6f |e new {\|tt resto|
|00005da0| 72 65 28 29 7d 0d 0a 66 | 75 6e 63 74 69 6f 6e 61 |re()}..f|unctiona|
|00005db0| 6c 69 74 79 20 77 69 6c | 6c 20 77 6f 72 6b 20 63 |lity wil|l work c|
|00005dc0| 6f 72 72 65 63 74 6c 79 | 20 6f 6e 20 61 6c 6c 20 |orrectly| on all |
|00005dd0| 70 6c 61 74 66 6f 72 6d | 73 2e 20 20 4f 6e 20 74 |platform|s. On t|
|00005de0| 68 65 20 4d 61 63 69 6e | 74 6f 73 68 2c 0d 0a 74 |he Macin|tosh,..t|
|00005df0| 68 65 20 6f 70 65 72 61 | 74 69 6e 67 20 73 79 73 |he opera|ting sys|
|00005e00| 74 65 6d 20 61 6c 6c 6f | 77 73 20 61 6e 20 61 70 |tem allo|ws an ap|
|00005e10| 70 6c 69 63 61 74 69 6f | 6e 20 74 6f 20 62 65 20 |plicatio|n to be |
|00005e20| 73 74 61 72 74 65 64 20 | 62 79 20 6f 70 65 6e 69 |started |by openi|
|00005e30| 6e 67 0d 0a 6f 6e 65 20 | 6f 66 20 74 68 65 20 61 |ng..one |of the a|
|00005e40| 70 70 6c 69 63 61 74 69 | 6f 6e 27 73 20 64 6f 63 |pplicati|on's doc|
|00005e50| 75 6d 65 6e 74 73 20 66 | 72 6f 6d 20 74 68 65 20 |uments f|rom the |
|00005e60| 64 65 73 6b 74 6f 70 3b | 20 74 68 65 20 61 70 70 |desktop;| the app|
|00005e70| 6c 69 63 61 74 69 6f 6e | 20 69 73 0d 0a 73 74 61 |lication| is..sta|
|00005e80| 72 74 65 64 2c 20 61 6e | 64 20 69 6e 66 6f 72 6d |rted, an|d inform|
|00005e90| 65 64 20 74 68 61 74 20 | 74 68 65 20 75 73 65 72 |ed that |the user|
|00005ea0| 20 77 69 73 68 65 73 20 | 74 6f 20 6f 70 65 6e 20 | wishes |to open |
|00005eb0| 74 68 65 20 73 70 65 63 | 69 66 69 65 64 20 66 69 |the spec|ified fi|
|00005ec0| 6c 65 2e 0d 0a 53 61 76 | 65 64 20 67 61 6d 65 20 |le...Sav|ed game |
|00005ed0| 66 69 6c 65 73 20 6f 6e | 20 74 68 65 20 4d 61 63 |files on| the Mac|
|00005ee0| 69 6e 74 6f 73 68 20 61 | 72 65 20 61 73 73 6f 63 |intosh a|re assoc|
|00005ef0| 69 61 74 65 64 20 77 69 | 74 68 20 74 68 65 20 67 |iated wi|th the g|
|00005f00| 61 6d 65 20 65 78 65 63 | 75 74 61 62 6c 65 0d 0a |ame exec|utable..|
|00005f10| 74 68 61 74 20 63 72 65 | 61 74 65 64 20 74 68 65 |that cre|ated the|
|00005f20| 6d 20 69 6e 20 73 75 63 | 68 20 61 20 77 61 79 20 |m in suc|h a way |
|00005f30| 74 68 61 74 20 74 68 65 | 20 67 61 6d 65 20 69 73 |that the| game is|
|00005f40| 20 65 78 65 63 75 74 65 | 64 20 77 68 65 6e 20 61 | execute|d when a|
|00005f50| 20 73 61 76 65 64 0d 0a | 67 61 6d 65 20 69 73 20 | saved..|game is |
|00005f60| 6f 70 65 6e 65 64 2e 20 | 20 54 68 69 73 20 69 73 |opened. | This is|
|00005f70| 20 73 69 6d 70 6c 79 20 | 61 20 63 6f 6e 76 65 6e | simply |a conven|
|00005f80| 69 65 6e 63 65 20 66 65 | 61 74 75 72 65 20 6f 6e |ience fe|ature on|
|00005f90| 20 74 68 65 20 4d 61 63 | 69 6e 74 6f 73 68 0d 0a | the Mac|intosh..|
|00005fa0| 74 68 61 74 20 61 6c 6c | 6f 77 73 20 61 20 70 6c |that all|ows a pl|
|00005fb0| 61 79 65 72 20 74 6f 20 | 72 75 6e 20 61 20 67 61 |ayer to |run a ga|
|00005fc0| 6d 65 20 61 6e 64 20 72 | 65 73 74 6f 72 65 20 61 |me and r|estore a|
|00005fd0| 20 73 61 76 65 64 20 70 | 6f 73 69 74 69 6f 6e 20 | saved p|osition |
|00005fe0| 69 6e 0d 0a 61 20 73 69 | 6e 67 6c 65 20 6f 70 65 |in..a si|ngle ope|
|00005ff0| 72 61 74 69 6f 6e 2e 0d | 0a 0d 0a 59 6f 75 20 63 |ration..|...You c|
|00006000| 61 6e 20 75 73 65 20 7b | 5c 74 74 20 72 65 73 74 |an use {|\tt rest|
|00006010| 6f 72 65 28 6e 69 6c 29 | 7d 20 69 6e 20 79 6f 75 |ore(nil)|} in you|
|00006020| 72 20 7b 5c 74 74 20 69 | 6e 69 74 7d 20 66 75 6e |r {\tt i|nit} fun|
|00006030| 63 74 69 6f 6e 20 74 6f | 20 63 68 6f 6f 73 65 0d |ction to| choose.|
|00006040| 0a 74 68 65 20 70 6f 69 | 6e 74 20 61 74 20 77 68 |.the poi|nt at wh|
|00006050| 69 63 68 20 74 68 65 20 | 73 61 76 65 64 20 67 61 |ich the |saved ga|
|00006060| 6d 65 20 69 73 20 72 65 | 73 74 6f 72 65 64 2e 20 |me is re|stored. |
|00006070| 20 49 66 20 79 6f 75 72 | 20 67 61 6d 65 20 68 61 | If your| game ha|
|00006080| 73 20 65 78 74 65 6e 73 | 69 76 65 0d 0a 69 6e 74 |s extens|ive..int|
|00006090| 72 6f 64 75 63 74 6f 72 | 79 20 74 65 78 74 2c 20 |roductor|y text, |
|000060a0| 79 6f 75 20 63 6f 75 6c | 64 20 63 61 6c 6c 20 7b |you coul|d call {|
|000060b0| 5c 74 74 20 72 65 73 74 | 6f 72 65 28 6e 69 6c 29 |\tt rest|ore(nil)|
|000060c0| 7d 20 28 61 6e 64 20 7b | 5c 74 74 20 72 65 74 75 |} (and {|\tt retu|
|000060d0| 72 6e 7d 0d 0a 69 66 20 | 74 68 65 20 66 75 6e 63 |rn}..if |the func|
|000060e0| 74 69 6f 6e 20 72 65 74 | 75 72 6e 73 20 7b 5c 74 |tion ret|urns {\t|
|000060f0| 74 20 6e 69 6c 7d 29 20 | 70 72 69 6f 72 20 74 6f |t nil}) |prior to|
|00006100| 20 64 69 73 70 6c 61 79 | 69 6e 67 0d 0a 74 68 65 | display|ing..the|
|00006110| 20 69 6e 74 72 6f 64 75 | 63 74 6f 72 79 20 74 65 | introdu|ctory te|
|00006120| 78 74 2c 20 73 69 6e 63 | 65 20 74 68 65 20 70 6c |xt, sinc|e the pl|
|00006130| 61 79 65 72 20 68 61 73 | 20 70 72 65 73 75 6d 61 |ayer has| presuma|
|00006140| 62 6c 79 20 61 6c 72 65 | 61 64 79 20 73 65 65 6e |bly alre|ady seen|
|00006150| 20 69 74 0d 0a 61 6e 79 | 77 61 79 2e 0d 0a 0d 0a | it..any|way.....|
|00006160| 54 68 65 20 72 65 61 73 | 6f 6e 20 74 68 61 74 20 |The reas|on that |
|00006170| 74 68 65 20 73 79 73 74 | 65 6d 20 64 6f 65 73 6e |the syst|em doesn|
|00006180| 27 74 20 72 65 73 74 6f | 72 65 20 74 68 65 20 73 |'t resto|re the s|
|00006190| 61 76 65 64 20 67 61 6d | 65 20 70 72 69 6f 72 20 |aved gam|e prior |
|000061a0| 74 6f 0d 0a 63 61 6c 6c | 69 6e 67 20 79 6f 75 72 |to..call|ing your|
|000061b0| 20 7b 5c 74 74 20 69 6e | 69 74 7d 20 66 75 6e 63 | {\tt in|it} func|
|000061c0| 74 69 6f 6e 20 69 73 20 | 74 68 61 74 20 79 6f 75 |tion is |that you|
|000061d0| 20 6d 61 79 20 77 61 6e | 74 20 70 61 72 74 73 20 | may wan|t parts |
|000061e0| 6f 66 20 79 6f 75 72 0d | 0a 7b 5c 74 74 20 69 6e |of your.|.{\tt in|
|000061f0| 69 74 7d 20 66 75 6e 63 | 74 69 6f 6e 20 74 6f 20 |it} func|tion to |
|00006200| 62 65 20 69 6e 76 6f 6b | 65 64 20 72 65 67 61 72 |be invok|ed regar|
|00006210| 64 6c 65 73 73 20 6f 66 | 20 77 68 65 74 68 65 72 |dless of| whether|
|00006220| 20 61 20 67 61 6d 65 20 | 69 73 20 67 6f 69 6e 67 | a game |is going|
|00006230| 0d 0a 74 6f 20 62 65 20 | 72 65 73 74 6f 72 65 64 |..to be |restored|
|00006240| 20 6f 72 20 6e 6f 74 2e | 20 20 46 6f 72 20 65 78 | or not.| For ex|
|00006250| 61 6d 70 6c 65 2c 20 79 | 6f 75 20 6d 61 79 20 77 |ample, y|ou may w|
|00006260| 69 73 68 20 74 6f 20 64 | 69 73 70 6c 61 79 20 79 |ish to d|isplay y|
|00006270| 6f 75 72 0d 0a 63 6f 70 | 79 72 69 67 68 74 20 6d |our..cop|yright m|
|00006280| 65 73 73 61 67 65 2c 20 | 6f 72 20 61 73 6b 20 61 |essage, |or ask a|
|00006290| 20 71 75 65 73 74 69 6f | 6e 20 66 6f 72 20 63 6f | questio|n for co|
|000062a0| 70 79 20 70 72 6f 74 65 | 63 74 69 6f 6e 2c 20 65 |py prote|ction, e|
|000062b0| 76 65 72 79 0d 0a 74 69 | 6d 65 20 74 68 65 20 67 |very..ti|me the g|
|000062c0| 61 6d 65 20 73 74 61 72 | 74 73 2c 20 65 76 65 6e |ame star|ts, even|
|000062d0| 20 77 68 65 6e 20 61 20 | 73 61 76 65 64 20 67 61 | when a |saved ga|
|000062e0| 6d 65 20 69 73 20 67 6f | 69 6e 67 20 74 6f 20 62 |me is go|ing to b|
|000062f0| 65 20 72 65 73 74 6f 72 | 65 64 2e 0d 0a 0d 0a 49 |e restor|ed.....I|
|00006300| 66 20 79 6f 75 20 64 6f | 20 6e 6f 74 20 6d 61 6b |f you do| not mak|
|00006310| 65 20 61 20 63 61 6c 6c | 20 74 6f 20 7b 5c 74 74 |e a call| to {\tt|
|00006320| 20 72 65 73 74 6f 72 65 | 28 6e 69 6c 29 7d 20 69 | restore|(nil)} i|
|00006330| 6e 20 79 6f 75 72 20 7b | 5c 74 74 20 69 6e 69 74 |n your {|\tt init|
|00006340| 7d 0d 0a 66 75 6e 63 74 | 69 6f 6e 2c 20 74 68 65 |}..funct|ion, the|
|00006350| 20 73 79 73 74 65 6d 20 | 77 69 6c 6c 20 61 75 74 | system |will aut|
|00006360| 6f 6d 61 74 69 63 61 6c | 6c 79 20 72 65 73 74 6f |omatical|ly resto|
|00006370| 72 65 20 74 68 65 20 73 | 61 76 65 64 20 67 61 6d |re the s|aved gam|
|00006380| 65 20 73 70 65 63 69 66 | 69 65 64 0d 0a 62 79 20 |e specif|ied..by |
|00006390| 74 68 65 20 70 6c 61 79 | 65 72 20 61 74 20 73 74 |the play|er at st|
|000063a0| 61 72 74 75 70 20 69 6d | 6d 65 64 69 61 74 65 6c |artup im|mediatel|
|000063b0| 79 20 61 66 74 65 72 20 | 79 6f 75 72 20 7b 5c 74 |y after |your {\t|
|000063c0| 74 20 69 6e 69 74 7d 20 | 66 75 6e 63 74 69 6f 6e |t init} |function|
|000063d0| 0d 0a 72 65 74 75 72 6e | 73 2e 20 20 48 65 6e 63 |..return|s. Henc|
|000063e0| 65 2c 20 6f 6d 69 74 74 | 69 6e 67 20 74 68 65 20 |e, omitt|ing the |
|000063f0| 63 61 6c 6c 20 74 6f 20 | 7b 5c 74 74 20 72 65 73 |call to |{\tt res|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.